排出警告
#if defined(_MSC_VER) && _MSC_VER >= 1310
# pragma warning( disable: 4996 ) // disable fopen deprecation warning
#endif
1:
2:warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
文件中某些地方用到的空格不是Unicode的.
3:如果有不想出现的警告(知道它们没有危害),可以去除它们。
project -> property -> configuration properties -> c/c++ -> Advanced -> disable specific warnings
4:fatal error C1010: unexpected end of file while looking for precompiled header directive
解决方法:
1、如果发生错误的文件是由其他的C代码文件添加进入当前工程而引起的,则Alt+F7进入当前工程的 Settings,选择C/C++选项卡,从Category组合框中选中Precompiled Headers,选择Not Using Precompiled headers。确定。
2、在文件开头添加:
#include "stdafx.h"