"Ramiro Rodriguez" <ergodicsum@yah oo.com> wrote in message
news:pan.2003.1 0.14.12.14.17.8 65085@yahoo.com ...[color=blue]
> In C there is a function to easily parse command line arguments called
> getopt.[/color]
No there is not. Your implementation might
provide one as an extension, but it's not
part of standard C.
[color=blue]
>Is there such a function in c++[/color]
No. If you decide to try to write one, we
can help.
While it was 14/10/03 1:14 pm throughout the UK, Ramiro Rodriguez
sprinkled little black dots on a white screen, and they fell thus:
[color=blue]
> In C there is a function to easily parse command line arguments called
> getopt. Is there such a function in c++[/color]
IINM, C++ can call any C function.
But I'm not sure that getopt is part of standard C or C++.
But quite recently I wrote a command line reader class that might be to
your needs (depending on what your needs are). I'll try and get it put
up somewhere soon.
Stewart.
--
My e-mail is valid but not my primary mailbox. Please keep replies on
on the 'group where everyone may benefit.
Ramiro Rodriguez wrote:
[color=blue]
> In C there is a function to easily parse command line arguments called
> getopt. Is there such a function in c++
>
> RR[/color]
1) getopt is part of the POSIX standard, not the ANSI C OR C++ standards.
2) You should be able to call it from a C++ program with no problems.
While it was 14/10/03 3:23 pm throughout the UK, Stewart Gordon
sprinkled little black dots on a white screen, and they fell thus:
<snip>[color=blue]
> But quite recently I wrote a command line reader class that might be to
> your needs (depending on what your needs are). I'll try and get it put
> up somewhere soon.[/color]
It's now up, complete with a bit of documentation (just under 8K in total):
Ramiro Rodriguez wrote:[color=blue]
> In C there is a function to easily parse command line arguments called
> getopt. Is there such a function in c++[/color]
you may want to try GNU Gengetopt that I personally maintain:
Comment