a miniature argument parser for c++
- Intended to be used with the cpp template as a pluggable module.
- Simply copy the
includes/parser
directory to your cpp project built using the cpp template
- Load the module using
#include"./../includes/parser/parser.h"
in yourapp.cpp
file. - Access the number of arguments, and character array with arguments using
int main(int argc, char* argv[])
- Create a parser instance, and feed it the
argc
andargv
valuesParser parser(argc, argv);
- Now check if a handle is passed or not using the
parser.has("handle")
method - To get the value of a handle, use
parser.val("handle")
method
- Sample code for demonstration is available in
app.js
Author: Yash Kumar Verma