小编に か*_*に か的帖子

字符串不与cin一起使用!

我的简单Hello World代码存在问题.

我不能说出cin我的名字.它说没有定义的运营商">>"有人可以帮忙.以下是我的代码.

  #include <iostream>
  using namespace std;

   int main()
   {
       int x;
       string name;
       cout<< "enter name:";
       cin>> name;
       cout<< "Hello "<< name <<endl;



       system("Pause");
    }
Run Code Online (Sandbox Code Playgroud)

c++

1
推荐指数
1
解决办法
4993
查看次数

标签 统计

c++ ×1