+ -
当前位置:首页 → 问答吧 → 关于GetPrivateProfileInt的问题

关于GetPrivateProfileInt的问题

时间:2011-12-07

来源:互联网

如下代码C/C++ code

#include <windows.h>
#include <iostream>
#define aMethod    0x0001
#define bMethod    0x0002
#define cMethod    0x0003
int main()
{
int Result = GetPrivateProfileInt("set", "method", 0, "F://set_method.cfg" );
cout<<Result<<endl;
}



set_method.cfg中数据如下:
[set]

method = aMethod | bMethod |cMethod

可是Result输出的结果是0,不是我想要的Result = aMethod | bMethod | cMethod的结果,该怎么解决?
很急,请求高手解答

作者: Black__Blood   发布时间: 2011-12-07

[set]
method = 2

作者: c_losed   发布时间: 2011-12-07