c++

1.codeblocks编译时,下面这行报错。错误为:

Error: Range-based loops are not allowed in C++98

for(int w:adj[v]) 

解决方法:  "setting->compiler->Global compiler settings->Compiler Flags"中勾选"Have g++ follow the c++11 ISO C++ language standard[-std=c++11]"

2.codeblocks中文输出乱码问题:

 参考这篇文章:http://blog.csdn.net/softman11/article/details/6121538

解决方法:“setting->compiler->Global compiler settings”,加入以下两行:

-finput-charset=UTF-8
-fexec-charset=GBK

 

posted @ 2017-08-15 10:58  bananaa  阅读(138)  评论(0编辑  收藏  举报