經常在Codeblocks中編寫代碼時,由於使用中文字符串,會出現如下錯誤:
Illegal byte sequence
其實這是因爲編譯器不支持中文。
在網上搜了半天,終於發現設置方法:
進入到“Setting-》Complier and debugger-》Global complier setting-》Compliter setting“, 在”Other Options“內輸入
“-finput-charset=GBK”
經常在Codeblocks中編寫代碼時,由於使用中文字符串,會出現如下錯誤:
Illegal byte sequence
其實這是因爲編譯器不支持中文。
在網上搜了半天,終於發現設置方法:
進入到“Setting-》Complier and debugger-》Global complier setting-》Compliter setting“, 在”Other Options“內輸入
“-finput-charset=GBK”