C 语言常见错误分析汇总 1、 在一个工程里出现两个 main 函数时 3
obj : error LNK2005: _main already defined in file1
obj Debug/HELLO
exe : fatal error LNK1169: one or more multiply defined symbols found 这个就是说,你的 main 函数重定义了
你看看是不是你的工程里面,包含了很多个有 main 函数的文件
2、 fatal error C1010: unexpected end of file while looking for precompiled header directive 出现这个错误的原因是,工程类型建错了,应该选择 win 32 console application 3、拼写错误 (1)#include //头文件拼写错了 void main() { printf("doeifweofupwp"); } fatal error C1083: Cannot open include file: 'stido
h': No such file or directory (2)#inculde //include 拼写错了 void main() { printf("doeifweofupwp"); } fatal error C1021: invalid preprocessor command 'inculde' (无效的预编译命令inculde) (3)#include void mian() //main 拼写错了 { printf("doeifweofupwp"); } error LNK2001: unresolved external symbol _mai