设为首页 加入收藏

TOP

VC读配置文件
2014-11-23 19:42:58 】 浏览:7443
Tags:配置 文件

[python]
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++;
}
}


配置文件格式:
[python]
[Setting]
11=11@163.cn
22=22@163.cn
ope=0.cn
作者:xiaocaiju

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇(Visual C++)游戏开发笔记十七 .. 下一篇(Visual C++)游戏开发笔记二十..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目