From 429e46051dba814e7d6c74368eb1bba550222cbe Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Thu, 1 Dec 2011 22:56:23 +0000 Subject: Imported Upstream version 1.4.8 --- samples/c++/sample2.cpp | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 samples/c++/sample2.cpp (limited to 'samples/c++/sample2.cpp') diff --git a/samples/c++/sample2.cpp b/samples/c++/sample2.cpp deleted file mode 100644 index defceb8..0000000 --- a/samples/c++/sample2.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/************************************************************************* - ** Sample2 - ** Load sample.cfg and access the "values" array - *************************************************************************/ - -#include -#include - -using namespace libconfig; -using namespace std; - -/***************************************************************************/ - -int main() -{ - Config cfg; - try - { - /* Load the configuration.. */ - cout << "loading [sample.cfg].."; - cfg.readFile("sample.cfg"); - cout << "ok" << endl; - - // Display the "values" array - cout << "display the \"values\" array.."; - Setting& s = cfg.lookup("values"); - long value1 = s[0]; - long value2 = s[1]; - cout << "[" << value1 << "," << value2 << "].."; - cout << "ok" << endl; - - cout << "Done!" << endl; - } - catch (...) - { - cout << "failed" << endl; - } - - return 0; -} - - -/***************************************************************************/ -- cgit v1.2.3