2025-12-03 08:54:33 -05:00
|
|
|
#include "fourdst/config/config.h"
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
2025-12-05 14:26:22 -05:00
|
|
|
struct AppConfig {
|
|
|
|
|
double x;
|
|
|
|
|
double y;
|
|
|
|
|
std::vector<std::string> men;
|
|
|
|
|
};
|
2025-12-03 08:54:33 -05:00
|
|
|
|
|
|
|
|
int main(int argc, char* argv[]) {
|
2025-12-05 14:26:22 -05:00
|
|
|
fourdst::config::Config<AppConfig> config;
|
|
|
|
|
config.load("/input.toml");
|
2025-12-03 08:54:33 -05:00
|
|
|
|
2025-12-05 14:26:22 -05:00
|
|
|
auto x = config->x;
|
|
|
|
|
const auto& men = config->men;
|
2025-12-03 08:54:33 -05:00
|
|
|
|
2025-12-05 14:26:22 -05:00
|
|
|
for (const auto& name : men) {
|
|
|
|
|
std::cout << "men are " << name << std::endl;
|
|
|
|
|
}
|
2025-12-03 08:54:33 -05:00
|
|
|
|
|
|
|
|
}
|