用VC++编程的时候提示说one or more multiply defined symbols found是怎么回事啊?急啊。比较四个数大小~

#include<iostream>
using namespace std;
int main()
{
unsigned int a,b,c,d,t;
cin>>a>>b>>c>>d;
if(a>b)
{t=a;
a=b;
b=t;}
if(b>c)
{t=b;
b=d;
d=t;}
if(c>d)
{t=c;
c=d;
d=t;}
if(a>c)
{t=a;
a=c;
c=t;}
if(b>d)
{t=b;
b=d;
d=t;}
if(a>d)
{t=a;
a=d;
d=t;}
cout<<a<<" "<<b<<" "<<c<<" "<<d<<endl;
return 0;
}
--------------------Configuration: test - Win32 Debug--------------------
Linking...
1.obj : error LNK2005: _main already defined in test.obj
Debug/test.exe : fatal error LNK1169: one or more multiply defined symbols found
执行 link.exe 时出错.

test.exe - 1 error(s), 0 warning(s)

这是tc程序,vc里有隐藏的main函数,所以重复定义了
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-03-04
重复定义的问题,其实这个main()函数是系统定义的,你再int main()定义一次,这......
改成void main()本回答被提问者采纳
相似回答