c++ 常见问题
1.中文输出乱码

解决办法(二选一)
#include <iostream>
#include "windows.h"
using namespace std;
// 方法1:
// 引入Windows.h
// 增加 SetConsoleOutputCP(CP_UTF8);
// 方法2:
// system("chcp 65001")
int main() {
SetConsoleOutputCP(CP_UTF8);
cout << "中国" << endl;
system("chcp 65001");
return 0;
}