You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

20 lines
438 B

#include <iostream>
#include <string>
#include <string_view>
#include <toml++/toml.hpp>
// g++ tomldemo.cpp -I ../libs/tomlplusplus -std=c++17
using namespace std::literals;
int main(int argc, char** argv) {
toml::table tbl;
try {
tbl = toml::parse_file("config.ini");
std::cout << tbl << "\n";
} catch (const toml::parse_error& err) {
std::cerr << "Parsing failed:\n" << err << "\n";
return 1;
}
return 0;
}