Xcode 3.0 - gdb Console hangs on C++ cin input
Xcode 3.0 - gdb Console hangs on C++ cin input
- Subject: Xcode 3.0 - gdb Console hangs on C++ cin input
- From: "Carol Willing" <email@hidden>
- Date: Wed, 7 May 2008 11:15:11 -0700
I'm wondering why the gdb Console hangs when entering a line of floats using C++ cin. The following code works fine as an executable in a terminal window.
The program prompts the user for a line of floats all at once. In the gdb Console within Xcode, the console just hangs and waits after entering the line of floats and hitting the return key.
The project is set up as a Command Line Utility using the C++ tool
Any thoughts?
Thanks,
Carol
float *GetValues(float *p, size_t n)
{
float *ptr, *end;
cout << "Enter " << int (n) << " space-separated floating point values: " << endl;
for (ptr = p, end = p + n; ptr < end; ++ptr)
cin >> *ptr;
return p;
}
Data Entered after cout prompt is displayed: 1.2 3.4 5 6 7.7 8e4 22.6e-4 11.22 .00 0.4
_______________________________________________
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