一、Codeblocks格式化代码
右键代码区,弹出对话框,选择Format use Astyle就好了。
二、codeblocks注释和取消注释
ctrl+shift+c:注释掉选中的多行代码
ctrl+shift+x:对已经注释的多行代码取消注释
三、Codeblocks报错:nullptr was not declared
解决办法:
1、Settings/Compiler...,进入Compiler Settings界面
2、然后GNU GCC Compiler/Compiler Settings/勾选Have g++ follow the coming C++0x ISO C++ language standard [-std=gnu++0x]
3、然后OK退出。
四、codeblocks 修改编码格式
修codeblocks中文乱码
选setting-compiler
GNU-GCC-compiler栏
other opitions
粘上
-fexec-charset=gbk
-finput-charset=UTF-8