分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
转自:http://hi.baidu.com/andywangcn/blog/item/10ba730f48160eeb37d122e9.html
配置文件中经常用到ini文件,在VC中其函数分别为: #include <Windows.h> //wince,WMobile.ppc不支持这几个函数 写入.ini文件:bool WritePrivateProfileString(LPCTSTR lpAppName, LPCTSTR lpKeyName, LPCTSTR lpString, LPCTSTR lpFileName);
读取整形值:UINT GetPrivateProfileInt(LPCTSTR lpAppName,LPCTSTR lpKeyName,INT nDefault,LPCTSTR lpFileName); 其中个参数的意思: LPCTSTR lpAppName ------- INI文件中的一个字段名 LPCTSTR lpKeyName -------- lpAppName 下的一个键名,也就是里面具体的变量名 LPCTSTR lpDefaut ----------如果没有其前两个参数值,则将此值赋给变量 LPSTR lpReturnedString --------接收INI文件中的值的CString对象,即接收缓冲区 DWORD nSize ------接收缓冲区的大小 LPCTSTR lpFileName --------完整的INI文件路径名 LPCTSTR lpString ---------是键值,也就是变量的值, 必须为LPCTSTR或CString类型 |