Quote:
cout << number = number + 1;
This statement is wrong (as the compiler noticed :-) ), because the insertion operator has higher precedence than the assignment one.
The following program
#include <iostream>
using namespace std;
int main()
{
int number = 49;
if ( number >= 50)
cout << "Yes " << endl;
cout << (number = number + 1);
}
outputs just
50
.