c++builder读取标准ini文件操作

void TForm1::ReadStandINIFile(){

                   AnsiString ExePath = ExtractFilePath(ParamStr(0)); 

                  ExePath += "indata.ini";TIniFile *db = new TIniFile(ExePath); 

                 AnsiString strNameFiled = db->ReadString("setting","namefield",ExePath).Trim(); 

                AnsiString strIdNum = db->ReadString("setting","idnum",ExePath).Trim(); 

                delete db;

}

INI文件

[setting] 

namefield=123456 

idnum=123456

你可能感兴趣的:(c++builder读取标准ini文件操作)