Xcode将不接受用户输入!

Xcode将不接受用户输入!,xcode,user-input,Xcode,User Input,我的xcode将编译,但不允许我输入任何内容 #include <iostream> using namespace std; bool truthStatement; int main (int argc, const char * argv[]) { string name; cout << "What is your name?" << endl; cin >> name; if (name == "Matt

我的xcode将编译,但不允许我输入任何内容

#include <iostream>
using namespace std;

bool truthStatement;
int main (int argc, const char * argv[])
{
    string name;
    cout << "What is your name?" << endl;
    cin >> name;
    if (name == "Matt"){
        cout << "You're cool" << endl;

    } else {
        cout << "You suck" << endl;
    }

}
#包括
使用名称空间std;
布尔真理陈述;
int main(int argc,const char*argv[]
{
字符串名;
姓名;
如果(名称=“马特”){

我以前可能遇到过这个问题。请确保您使用的是返回键而不是键盘上的回车键。

这对您来说仍然是一个问题吗?刚刚在XCode中尝试了一个测试项目。似乎工作正常。您的问题解决了吗?