MCPcopy Create free account
hub / github.com/Tencent/phxsql / main

Function main

phxcomm/configparser/inih-master/cpp/INIReaderTest.cpp:6–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "INIReader.h"
5
6int main() {
7 INIReader reader("../examples/test.ini");
8
9 if (reader.ParseError() < 0) {
10 std::cout << "Can't load 'test.ini'\n";
11 return 1;
12 }
13 std::cout << "Config loaded from 'test.ini': version=" << reader.GetInteger("protocol", "version", -1) << ", name="
14 << reader.Get("user", "name", "UNKNOWN") << ", email=" << reader.Get("user", "email", "UNKNOWN") << ", pi="
15 << reader.GetReal("user", "pi", -1) << ", active=" << reader.GetBoolean("user", "active", true) << "\n";
16 return 0;
17}

Callers

nothing calls this directly

Calls 3

ParseErrorMethod · 0.80
GetIntegerMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected