Strange Compiler Anomaly: VC++/MinGW <resolved>
--EDIT--
The problem turned out to be some "bad implemenation" for in_avail() in GCC.
Here's the code in question:
Code:
string input;
cin >> input; //lets say the input is "hello hello"
cout << "Your Text: " << input << endl;
cout << "Number of chars: " << cin.rdbuf()->in_avail() << endl;
When I compile this with Mingw, in_avail() returns 0. However, when I compile it with VC++7, it returns a proper count of the number of characters left in the buffer (in this case, 7). Any idea why this happens?