View Full Version : standard input not working in xcode

Mar 29, 2012, 01:02 AM
Hi all,

Trying to compile a basic c++ program in xcode:

#include <iostream>

int main (int argc, const char * argv[])
std::cout << "Enter your name";
std::string name;
std::cin >> name;
std::cout << "Welcome, " + name;

return 0;

I look at console in xcode and it prints "Enter your name", but it should also prompt me to enter a name but it doesn't

thanks for response