I want to have two options for the program: the start address and the end address, so that the program parameters are as follows:
--start_address 0xc0000000 --end_address 0xffffffff
Is it possible to take such hexadecimal input for options_description ? Should I treat the input as a string and convert them to hexadecimal values. I have this at the moment:
po::options_description desc("Allowed options"); desc.add_options() ("help,h", "display this help message") ("path,p", po::value<std::string>(), "Executable file path") ("start_address,s", po::value<std::string>(), "Start address") ("end_address,e", po::value<std::string>(), "End address") ;
Can boost::lexical_cast do such a conversion?
c ++ boost boost-program-options
dubnde
source share