找错误,error C2601: 'sum' : local function definitions are illegal什么意思
#include<stdio.h>#include<conio.h>
#include<ctype.h>
int sum();
void main()
{int tot;tot=sum();if (tot==-1)
printf("\nnot select!\n");
else printf("\nthe result is:%d\n",tot);
int sum ( )
{
int i,tot=0;
char key;
key=getche ();
if (key!='0'&&key!='1')
return(-1);
for(i=(key=='0')?2:1;i<=100;i+=2)
tot+=i;
return (tot);}