When I have two optional command line string arguments, if I don't actually give the first on the command line, its default value gets replaced with the variable name of the second argument. Example:
GetPot cl(argc, argv);
const char outpath = cl("outpath", ".").c_str();
cout << "Outpath is " << outpath << endl;
const char filepattern = cl("filepattern", "det*.root").c_str();
cout << "Outpath is " << outpath << endl;
cout << "File pattern is " << filepattern << endl;
//...
When I run a program that includes the above, and I don't specify any command line arguments, I get the following output:
Outpath is .
Outpath is filepattern
File pattern is det*.root
Thanks for looking into this!
-Rob.
Anonymous