C++ Builder 读取配置文件:
1)指定配置文件位置
TIniFile * m_pIniFile; //配置文件
m_pIniFile = new TIniFile(ExtractFilePath(Application->ExeName)+"Config.ini");
记得加入#include <IniFiles.hpp> //Use TIniFile
2)读取配置文件
AnsiStringpath= m_pIniFile->ReadString("Config","path","");
int m_nDBType = m_pIniFile->ReadInteger("Config","DatabaseType",0);
3)修改配置文件某值
m_pIniFile->WriteString("Config","name","Hello") ;