#include "stdafx.h" #include namespace po = boost::program_options; using namespace std; int main() { int argc = 3; char* argv[] = { "", "--open", "", }; po::options_description desc; desc.add_options() ("open", po::value()) ; po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); po::notify(vm); return 0; }