今天工程引用了一份代码, 编译出N多错误, 诡异的是这些所谓的‘错误’都是正确的,是绝对没有问题的,查找了半天,终于找到问题所在:
编译最上方有这个警告:
Warning C4819:The file contains a character that can not be represented in the current code page(936).
save the file in unicode format to prevent data loss.
有字符不能被识别,建议保存成unicode格式
解决办法:
打开warning的文件 ctrl+A全选 然后选择菜单: File->advanced save options
选择编码格式:UNICODE codepage 1200 问题就解决了
这个问题告诉偶 不要只看编译错误 编译警告也是不可忽视的~