daily pastebin goal
21%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. namespace po = boost::program_options;
  2. po::options_description desc("Allowed options");
  3. desc.add_options()
  4.     ("option1", po::value<int>(&int1), "set value for option1")
  5.     ("option2", po::value<int>(&int2)->default_value(int1), "set value for option2, default is option1")
  6. ;
  7.    
  8. po::variables_map vm;
  9. po::store(po::parse_command_line(argc, argv, desc), vm);
  10. po::notify(vm);
  11.  
  12. if (vm.count("config")) {
  13.     std::ifstream cfs(config_file, std::ifstream::in);
  14.     po::store(po::parse_config_file(cfs, desc), vm);
  15.     po::notify(vm);
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top