找不到哪里错了,请求各位帮帮忙~
#include <iostream.h>int mian()
{
int a[15]={88,99,1,2,3,4,5,6,7,8,9,10,55,66,1},k=15;
int sum=a[0]+a[1]+a[2]+a[3];
int maxsum=sum;
int maxindex=0;
for(int i=0;i<k;i++)
{
sum=sum-a[i]+a[(i+4)%k];
if(sum>maxsum)
{
maxsum=sum;
maxindex=(i+1)%15;
}
}
cout<<"the maxsum is:"<<maxsum<<endl;
cout<<"the maxindex is:"<<maxindex<<endl;
return 0;
}
错误显示为: fatal error LNK1120: 1 unresolved externals