0

Follow this guide, I'm trying to read an ini file.

try {
    boost::property_tree::ptree pt;
    boost::property_tree::ini_parser::read_ini("profiles.ini", pt);
    std::cout << pt.get<std::string>("Session1.Value1") << std::endl;
}
catch(const boost::property_tree::ptree_error &e)
{
     cout << e.what() << endl;
}

But I'm get this error.

Another question, Can I read an ini file with a path with boost lib?

Community
  • 1
  • 1

1 Answers1

0

this probably profiles.ini is not in your working directory, or current account does not have permission to access it.

secmask
  • 7,649
  • 5
  • 35
  • 52