This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
cin not working
- To: <libstdc++ at gcc dot gnu dot org>
- Subject: cin not working
- From: "Yasir" <yasir_home at bigfoot dot com>
- Date: Mon, 9 Apr 2001 18:42:42 +1000
Apologies if this is a known problem.
When I run the following code
#include <iostream>
using namespace std;
int main()
{
int i;
cin >> i;
cout << "i == " << i << endl;
}
cin doesn't wait for input - the cout code gets executed with a random value
for i.
I'm using gcc from CVS, updated a few hours ago.
When I run the same code under gcc 2.95.3 it works fine.
Is this a problem with libstdc++-v3 or could my setup be wrong?
Thanks,
Yasir