standard input from console not working in Xcode 4.5
standard input from console not working in Xcode 4.5
- Subject: standard input from console not working in Xcode 4.5
- From: email@hidden
- Date: Fri, 21 Sep 2012 10:52:40 -0400
If I create a simple command line C++ program in Xcode 4.5 such as:
#include <iostream>
using namespace std;
int main(int argc, const char * argv[])
{
int x;
cout << "enter x: ";
cin >> x;
cout << x << endl;
return 0;
}
When I go to type in a value for x in the console, only the first digit is displayed as you type it although all digits are read:
If I type: 123
You only see the 1, but x does contain 123 as the next output line shows.
I've seen this on three separate machines, two with 10.8 and one with 10.7.
Yes, I'll file a radar, but does anyone know a workaround (I can run the program from the Terminal fine) as this is driving my students nuts.
Thanks,
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden