{
static bool b1=((GetPrivateProfileInt(_T("test"),_T("test"),0,_T(".\\test.ini")))!=0);
static bool b2=(0!=(GetPrivateProfileInt(_T("test"),_T("test"),0,_T(".\\test.ini"))));
bool b3=((GetPrivateProfileInt(_T("test"),_T("test"),0,_T(".\\test.ini")))!=0);
bool b4=(0!=(GetPrivateProfileInt(_T("test"),_T("test"),0,_T(".\\test.ini"))));
}
从文件中读出的值为1,应该都读出来了
但结果是只有b2=false,其余为true
原来代码用的是b2的形式,结果也是对的,现在换了一台机器,系统也都是XP,为什么就不对了呢?貌似局部静态变量的初始化有什么不一样吗?