您的位置:首页 > 其它

g++编译cout输出乱码问题解决

2010-10-06 19:08 441 查看
mingw下载后

#include <iostream>
using namespace std;
int main(int argc,const char* argv[]){
cout<<"中文测试/n";
return 0;
}


结果输出乱码,原来是一个参数没有写

    g++ -fexec-charset=GBK
-Wl,--enable-auto-import  helloworld.cpp

ok这样输出就没有问题了。

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  测试