ReadInt
Retrieves an integer value from the specified section in an initialization file
int ReadInt( LPCSTR lpcszSection, LPCSTR lpcszKey, int nDefault )
integer value specified by section and key from initialization file
EX1
//gets current value for Initial Origin window state from Origin.ini file //see "Config" section in Origin.ini for more details void INIFile_ReadInt_ex1() { string strFileName = GetAppPath(1)+ "Origin.ini"; INIFile ini(strFileName); printf("Initial Origin window state is %d", ini.ReadInt("Config", "ShowState", -1)); }
origin.h