Return to Snippet

Revision: 24266
at February 24, 2010 17:13 by jimfred

Initial Code
#include "SimpleIni.h"
#include <stdio.h>

// Linux gcc compilation: 
//   g++ -o test.exe test.cpp
//   gcc -o test.exe test.cpp -lstdc++

int main( int argc, char** argv)
  CSimpleIniA ini;

  ini.SetValue("section", "param", "123");
  // Should result in file with contents:
  //   [section]
  //   param=123
  const char * pVal = ini.GetValue("section", "param", "default");
  printf( "value=%s", pVal ); // should print "value=123"
  return 0;


Initial URL

Initial Description

Initial Title
trivial example, C++, gcc, using simpleIni.h

Initial Tags

Initial Language