VC读配置文件实例
2018-10-12 14:09
405 查看
本文实例讲述了VC读配置文件的方法,分享给大家供大家参考。具体实现方法如下:
char szBugCC[4096]={0};
int nRet = GetPrivateProfileSection("Setting", szBugCC, sizeof(szBugCC), BugConfig.c_str());
if (nRet > 0)
{
//过滤/0 /0 /00
DWORD dwIndex = 0;
char szTemp[128]={0};
while (dwIndex < nRet)
{
strcpy(szTemp, szBugCC+dwIndex);
//szTemp "11=11@163.com"
CString strTemp(szTemp);
int nPos = strTemp.Find("=");
m_combo_bugcc.AddString(strTemp.Left(nPos));
dwIndex += strlen(szTemp);
dwIndex++;
}
}
配置文件格式:
[Setting]
11=11@163.cn
22=22@163.cn
ope=0.cn
希望本文所述对大家的VC程序设计有所帮助。
您可能感兴趣的文章:
相关文章推荐
- Flash上传控件Swfupload php文件上传配置使用实例
- VC使用tinyxml读写INI,cfg,XML配置文件
- Caffe实例开发学习笔记。——网络配置文件 Layer参数详解——
- Samba之文件共享配置实例
- VC++读写INI配置文件
- mysql系列之多实例2----基于多配置文件
- 坚持#第269天~tomcat(安装、配置文件、虚拟主机、多实例)
- VC使用tinyxml读写INI,cfg,XML配置文件
- 实例解读PLSM2的运行配置文件及地图分割配置文件
- Mybatis 配置文件 含 foreach 项目中实例
- Python 读写一个配置文件的实例分解 (二)
- python读写ini配置文件方法实例分析
- Solaris zfs文件系统实例配置
- 新手,Visual Studio 2013 配置Boost库。 如何编译和选择,遇到无法打开文件“libboost_thread-vc120-mt-gd-1_58.lib的解决办法
- 一台机器搭建两个MySQL实例配置文件
- vc 用函数读写INI配置文件
- VC++读写配置文件
- Nginx配置文件详细说明 实例
- ORACLE配置tnsnames.ora文件实例
- VC写的读写配置文件的类