作业帮 > 综合 > 作业

Debug/AFG.exe :fatal error LNK1169:one or more multiply defi

来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/08/19 17:44:31
Debug/AFG.exe :fatal error LNK1169:one or more multiply defined symbols found
#include
void main()
{
int a,b;
int *pointer_1,*pointer_2;
a=100;b=10;
pointer_1=&a;
pointer_2=&b;
printf("%d,%d\n",a,b);
printf("%d,%d\n",*pointer_1,*pointer_2);
}
c的程序在vc++中就出现这种情况.如何在VC中正确的执行
Debug/AFG.exe :fatal error LNK1169:one or more multiply defi
语法没有问题,可能是VC++的原因,你新建一个项目,把代码复制过去试试
再问: 试过了还是一样的错误,编译没问题就是运行的时候有出现这个问题
再答: 这个问题一般是函数重复定义造成的,你检查一下项目里有没有其他cpp文件,有没有重复定义的函数和全局变量吧,如果没有我也不太清楚了