I have a problem with boost::program_options
I have an option "password,p" (--password || -p)
this option is supposed to be able to accept the password (not recommended) via command line and if the option is empty (myprog -v -p -o file) then it should be added to the vector<string> as "" (empty) because multiple passwords can be defined (myprog -v -p pass1 pass2 -p -o file) but when i get to a -p that is without an value. regarless of whether I use implicit_value(vector<string>(1,"")) or default_value(..) it replaces the entire vector with the value I gave it. is there a way to have it added to the vector ?
<---Posted Elsewhere :P on accident -->
Hi guys. I'm new here.
You can delete your other post by clicking on the delete (red X) in the corner of the post box if no one has replied yet.
In any case, I have only used program options for a couple simple uses. The way you are accepting the data as an std::vector means that you will be getting a new vector for each parameter. So I would suggest trying to find a way to adjust the code to read individual strings and just manually push_back() them into the vector.