Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Library functions for handling command line arguments or options

Reply
Thread Tools

Library functions for handling command line arguments or options

 
 
lovecreatesbea...@gmail.com
Guest
Posts: n/a
 
      01-11-2007
Are there some standard library functions for handling command line
arguments or options? Thank you.

 
Reply With Quote
 
 
 
 
mlimber
Guest
Posts: n/a
 
      01-11-2007
(E-Mail Removed) 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

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Erik_Wikstr=F6m?=
Guest
Posts: n/a
 
      01-11-2007
On 2007-01-11 17:42, (E-Mail Removed) 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
 
Reply With Quote
 
Roland Pibinger
Guest
Posts: n/a
 
      01-11-2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: want to show list of available options and arguments in mycommand line utility Peter Otten Python 0 09-16-2012 07:23 AM
why doesn't this "belongs_to" line of code, using options override,not work??? (need help using belongs_to with options) Greg Hauptmann Ruby 1 10-30-2008 10:44 PM
functions and arguments.length; passing unknown number of arguments oldyork90 Javascript 10 09-27-2008 03:05 AM
Any class to help me process the command line options? PengYu.UT@gmail.com C++ 8 05-04-2005 07:39 AM
Run Unix shell command $ parse command line arguments in python rkoida@yahoo.com Python 4 04-23-2005 04:42 AM



Advertisments