Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

johnmerlino

macrumors member
Original poster
Oct 22, 2011
81
0
Hi all,

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

Code:
#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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.