莫明的错误看不懂啊 求指教...
错误是Linking...
0.obj : error LNK2001: unresolved external symbol "int __cdecl f(int)" (?f@@YAHH@Z)
Debug/0.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
0.exe - 1 error(s), 0 warning(s)
#include<iostream.h>
main()
{
int f (int y);
int x,c;
cin>>x;
c = f(x);
cout<<x<<endl;
return 0;
}
int f(int i,int x)
{
i=2;
for (i<x ;i++;)
if (x%i==0)
x=0;
else
x=1;
return (x);
}