Skip to content

Instantly share code, notes, and snippets.

@allen501pc
Created December 31, 2011 08:42
Show Gist options
  • Save allen501pc/1543412 to your computer and use it in GitHub Desktop.
Save allen501pc/1543412 to your computer and use it in GitHub Desktop.
C++ Read Configuration
ConfigFile cf("config.txt");
std::string foo;
std::string water;
double four;
foo = cf.Value("section_1","foo" );
water = cf.Value("section_2","water");
four = cf.Value("section_2","four" );
std::cout << foo << std::endl;
std::cout << water << std::endl;
std::cout << four << std::endl;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment