Code:
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string mystring;
getline(cin, mystring);
cout << mystring << endl;
return 0;
}
I can't even type in a single character:
Code:
Untitled(58970) malloc: *** error for object 0x1000041c0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Program received signal: “SIGABRT”.
The strange thing is that the program works normally in both Terminal.app and gdb, so I don't know what the Debugger Console in Xcode is doing to produce the crash.