[求助]这个错在哪了
帮忙看一下:#include<iostream.h>
long gcd1(int x,int y);
void main()
{
int a,b;
cout<<"enter two numbers:";
cin>>a>>b;
long f=gcd1(a,b);
cout<<f<<endl;
}
long gcdl(int x,int y)
{
if(x%y==0)
return y;
else
return(y,x%y);
}
错误是:
0.obj : error LNK2001: unresolved external symbol "long __cdecl gcd1(int,int)" (?gcd1@@YAJHH@Z)
Debug/10.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.