I am using toml++. How can I modify a particular value of a TOML file in CPP using toml++
json ConfigService::getAllData(std::string filePath) { try { auto _data_table = toml::parse_file(filePath); _data_table["config_paths"]["DIAAI_core"] = "diaaiSetting.toml"; # this is not working cout << _data_table << endl; } catch (const exception err) { std::cerr << "Parsing failed:\n" << err.what() << "\n"; std::runtime_error(err.what()); } }
traceback
error: no match for ‘operator=’ (operand types are ‘toml::v3::node_view<toml::v3::node>’ and ‘int’) 51 | _data_table["config_paths"] = 1;
_data_table["config_paths"]
_data_table
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)