Monthly Archives: March 2014

parsing options using libc’s argp

For the longest time I used getopt to parse options in my C/C++ programs. Only today I discovered argp.h (which is a part of GNU libc). argp adds documentation line for each flag in long options as well as formats a help message for you. Below is a link and a quick example

http://www.gnu.org/software/libc/manual/html_node/Argp-Example-3.html#Argp-Example-3