比如说这个程序:
#include<iostream>
using namespace std;
void main()
{
int a(1),b(2),c(3);
int f;
f=a|b&c;
cout<<f<<endl;
}
在别人的电脑上用VC++6.0运行的结果是3,在我的电脑上结果是1,这是什么问题呀?请各位高手指教一下!谢谢!
比如说这个程序:
#include<iostream>
using namespace std;
void main()
{
int a(1),b(2),c(3);
int f;
f=a|b&c;
cout<<f<<endl;
}
在别人的电脑上用VC++6.0运行的结果是3,在我的电脑上结果是1,这是什么问题呀?请各位高手指教一下!谢谢!
你电脑编译环境问题,这道题不管怎么运行结果都应该是3.