2.2.5.2.4 INIFile::INIFile

Description

Constructor to determine what INI file to use

Syntax

INIFile( LPCSTR lpcszFilename = NULL, BOOL bUseIniPath = TRUE )

Parameters

lpcszFilename
[input] File name (can specify full path and file name)
bUseIniPath
[input] Set to TRUE for INI path, false for program path

Return

Examples

EX1

//Change column A's format to data: dd/yyyy and save it
//you can find it in your user file folder: Origin.ini [Column Custom Format List] section
void INIFile_ex1()
{
    INIFile ini1("Origin.ini", FALSE);	//if false, for exe path 
    INIFile ini2("Origin.ini");			//if true, for user file folder path
    int nNumLevels1 = ini1.ReadInt("Config", "NumLevels", 0);
    string strCustomFormat = ini2.ReadString("Column Custom Format List", "CustomFmt0");
    printf("NumLevels in Program folder ini %d\n", nNumLevels1);
    printf("strCustomFormat in user file folder = %s\n", strCustomFormat);
}

Remark

See Also

Header to Include

origin.h