Hello!
I am new to C ++ and I still don’t understand when what methods are called by classes in C ++, so the question arose:
There is a configuration file that needs to be parsed, I decided to choose the boost library. Everything is relatively simple in it:
namespace po = boost::program_options; int a; po::options_description desc("conf_file"); desc.add_options() ("a", po::value<int>(&a)); po::variables_map vm; std::ifstream settings_file("conf.ini"); po::store(po::parse_config_file(settings_file, desc), vm); settings_file.close(); po::notify(vm);
Everything works well, but actually the question is: how to make it work if a - std :: complex? If just changing the 6th line to po :: value <std :: complex <double >> (& a), then in what form should the variable be set in the file itself?