#include
using namespace std;
int main(){
cout<<"张浩宇真帅";
return 0;
}
为什么图标为红色的C++编译器不可以输出中文,而蓝色的C++编译器却可以输出中文?
#include<iostream>
using namespace std;
int main(void)
{
for (int i = 1; i < 10; i++)
{
for (int j = 1; j <= i; j++)
{
cout << i <<"*"<< j<<"="<< i* j<<" ";
}
cout << endl;
}
system("pause");
return 0;
}
cout语句后面的分号是全角字符
记事本里编写你下面的代码,另存为,文件编码选择utf8,文件名叫你原来那个cpp
然后覆盖掉看看
文字编码问题