如编译时遇到如下所示的编译错误:
./month_matcher.cpp:1: error: stray ‘\357’ in program
./month_matcher.cpp:1: error: stray ‘\273’ in program
./month_matcher.cpp:1: error: stray ‘\277’ in program
./month_matcher.cpp:1: error: stray ‘\357’ in program
./month_matcher.cpp:1: error: stray ‘\273’ in program
./month_matcher.cpp:1: error: stray ‘\277’ in program
则说明文件为“带BOM头的UTF8”编码格式,相应的解决方法是将文件转换为“不带BOM头的UTF8”编码格式,Notepad++就带有这样的功能:

本文介绍了一种常见的编译错误——由带BOM头的UTF8编码格式导致的错误,并提供了使用Notepad++进行文件编码转换的具体解决办法。
1240

被折叠的 条评论
为什么被折叠?



