In XCode 4, when I run something like this:
string input; cout << \"Enter command\" << endl; getline(cin, input); cout << \"You entered: \"
Are you pressing Return or Enter at the end of your input line? For some keyboard the enter and return are on the same button, but if you press "shift" key, while pushing the enter/return button scanf will work.