以下代码无效.我在命令中收到错误cin >> h.我究竟做错了什么?
#include <iostream>
using namespace std;
int main()
{
string h = " ";
cout << "hi" << endl;
cin >> h;
cout << h << endl;
system("pause");
return 0;
}
Run Code Online (Sandbox Code Playgroud)