windows环境的话,设置控制台
#include <iostream>
#ifdef WIN64
#include <Windows.h>
#endif
int main() {
#ifdef WIN64
SetConsoleOutputCP(CP_UTF8);
#endif
std::cout << "玩游戏开始" << std::endl;
int i = 100;
int *p = &i;
std::cout << i << std::endl;
std::cout << p << std::endl;
i = 101;
*p = 201;
std::cout << i << std::endl;
std::cout << p << std::endl;
}