#include<iostream>
#include<string>
using namespace std;//caution
int main() {
string str = "hello";
cout << "请输入str值为:" << endl;
cin >> str;
cout << "char的值为:" << str << endl;
system("pause");
return 0;
}
vscode右下角有个选项默认为UTF-8,点击之后,选择通过编码保存,找到Simplified Chinese(),就可以解决中文乱码的问题,不过还是建议尽快适应英文