Hi
The following code must give error but it does not! I use gcc 3.3.4 under Slackware Linux.
But the code below gives error message...Code:#include <iostream>
using namespace std;
int main()
{
if (int x = getchar())
cout << x;
x = 50; // must be an error
}
What is the reason of this?Code:
#include <iostream>
using namespace std;
int main()
{
if (int x = getchar())
cout << x;
cout << x; // error
}