#include <stdio.h>
int length(char *point)
{
int n=0;
if (*point!='\0')
{
point++;
n++;
}
return n;
}
void main()
{
int m;
char *point;
char chars[80];
printf ("please enter a chars\n");
gets(chars);
point=chars;
m=length(chars);
printf("The length of the chars is %d.\n",m);
}
I want to ask why the "n" can't be added? I think the problem is about the use of point,but i can't find it. Thanks.