Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Library functions for handling command line arguments or options (http://www.velocityreviews.com/forums/t459784-library-functions-for-handling-command-line-arguments-or-options.html)

lovecreatesbea...@gmail.com 01-11-2007 04:42 PM

Library functions for handling command line arguments or options
 
Are there some standard library functions for handling command line
arguments or options? Thank you.


mlimber 01-11-2007 04:52 PM

Re: Library functions for handling command line arguments or options
 
lovecreatesbea...@gmail.com wrote:
> Are there some standard library functions for handling command line
> arguments or options? Thank you.


strtok is one, but it is generally avoided in C++. Look into Boost's
Tokenizer (http://boost.org/libs/tokenizer/index.html) or program
options library (http://boost.org/doc/html/program_options.html).

Cheers! --M


=?ISO-8859-1?Q?Erik_Wikstr=F6m?= 01-11-2007 07:03 PM

Re: Library functions for handling command line arguments or options
 
On 2007-01-11 17:42, lovecreatesbea...@gmail.com wrote:
> Are there some standard library functions for handling command line
> arguments or options? Thank you.
>


If you are on a POSIX-compatible platform you might be interested in
getopt*, used on many unix/linuxes.

* http://www.opengroup.org/onlinepubs/...ns/getopt.html)

--
Erik Wikström

Roland Pibinger 01-11-2007 09:33 PM

Re: Library functions for handling command line arguments or options
 
On 11 Jan 2007 08:42:44 -0800, lovecreatesbeauty wrote:
>Are there some standard library functions for handling command line
>arguments or options? Thank you.


Not Standard but this looks nice:
http://www.codeproject.com/useritems/SimpleOpt.asp

Good luck,
Roland Pibinger


All times are GMT. The time now is 09:59 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57