arg

A C++ command-line parser
Download

arg Ranking & Summary

Advertisement

  • Rating:
  • License:
  • LGPL v3
  • Price:
  • FREE
  • Publisher Name:
  • Chun-Chung Chen
  • Publisher web site:
  • http://ccdw.org/~cjj/prog/ccgo/

arg Tags


arg Description

A C++ command-line parser arg is a C++ command-line parser.Example#include < arg.hh >#include < iostream >int main(int argc, char ** argv){ arg::Parser p; int n; p.add_opt('n').stow(n); p.parse(argc, argv); std::cout < < n < < '\n'; return 0;}Above is a simple example making use of the arg parser. After unpacking the source package, you can find it as “arg_ex0.cc” in the package directory. Without installation, you can test it with the following commands:$ c++ arg_ex0.cc arg.cc -I. -o arg_ex0$ ./arg_ex0 -n123123For simple applications, simply copy “arg.cc” and “arg.hh” to your program directory then follow the usage demonstrated above.


arg Related Software