User forums > Using Code::Blocks
why?left shift count >= width of type
(1/1)
erwin_diow:
when I build the code as following:
--- Code: ---#include <iostream>
using namespace std;
int main()
{
cout << "请输入一个大于1的整数:" << endl;
int x;
cin>>x;
if(x>1 || x<<99)
cout<<"x大于1或小于100\n";
else
cout<<"x大于或者等于100\n";
return 0;
}
--- End code ---
there is a warning
MortenMacFly:
--- Quote from: erwin_diow on June 10, 2011, 11:52:16 am ---there is a warning
--- End quote ---
Unrelated to Code::Blocks. Please respect our forum rules and ask in a C/C++ developer forum. Thank you.
Topic locked.
Navigation
[0] Message Index
Go to full version