Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: erwin_diow on June 10, 2011, 11:52:16 am

Title: why?left shift count >= width of type
Post by: erwin_diow on June 10, 2011, 11:52:16 am
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;
}
there is a warning
Title: Re: why?left shift count >= width of type
Post by: MortenMacFly on June 10, 2011, 12:16:34 pm
there is a warning
Unrelated to Code::Blocks. Please respect our forum rules and ask in a C/C++ developer forum. Thank you.

Topic locked.