请各位高手帮我查查这个程序问题在哪?
#include<stdio.h>#define size 100
void main()
{
char*index(char[],char);
char message[size];
char *p,c;
printf("\n Enter a sentence:");
gets(message);
printf("\n Enter a charcter:");
scanf("%c",&c);
p=index(message,c);
printf("%d\n",*p);
}
char*index(char *str,char c);
{
int i=1,found=0;
char *m;
while(*str!='\0'&&!found)
{
if(*str==c)
{
found=1;
m=&i;
return(m);
}
str++;
i++;
}
}