codeblocks在程序里输入中文,编译时报错

在程序里输入中文,在编译的时候报错图片说明

设置文件编码格式等

settings -> compiler and debugger settings -> global compiler settings -> compiler settings -> Other Options在Other Options中输入 finput-charset=***。finput-charset=后面跟着的***是告诉编译器源文件的格式,源文件是什么格式就写什么上去,例如:GBK、UTF-8、Unicode等等。一般是UTF-8