Arg_parser is an argument parser that follows POSIX and GNU conventions for command line arguments. It is implemented as a C++ class, and is simpler, easier to use, and safer that `getopt_long'.

For maximum stability, Arg_parser is self-contained. It extracts all the information it needs from its arguments to avoid refering to them later. This avoids index-out-of-bounds errors.

Arg_parser does not modify its arguments, nor uses any global variables. So you may create more than one parser in your program if you need or want to.

Arg_parser can also parse options from configuration files.

To use Arg_parser in your own programs simply copy the files `arg_parser.h' and `' in your sorce tree. See also the file `' for an example of use.


Released versions of Arg_parser can be found here. You may also subscribe to Freshmeat and receive an email every time a new version is released.

How to Get Help

For general discussion of bugs in Arg_parser the mailing list is the most appropriate forum. Please send messages as plain text. Please do not send messages encoded as HTML nor encoded as base64 MIME nor included as multiple formats. Please include a descriptive subject line. If all of the subject are "bug in Arg_parser" it is impossible to differentiate them.

An archive of the bug report mailing list is available at

How to Help

To contact the author, either to report a bug or to contribute fixes or improvements, send mail to Please send messages as plain text. If posting patches they should be in unified diff format against the latest version. They should include a text description and the unified diff inline in the message and not attached to it.

Valid HTML 4.01!

Copyright (C) 2006 Antonio Diaz Diaz

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

Updated: $Date: 2006/06/09 10:42:25 $ $Author: antonio $