VC++6.0编译
#include "stdafx.h"
#include <stdio.h>
int GetLen(char * str)
{
int count = 0;
char * p;
p = str;
while(*p!='\0')
{
count ++;
p++;
}
return count;
}
int main()
{
char mystring[20];
scanf("%s",mystring);
int len ;
len = GetLen(mystring);
printf("the len is %d\n",len);
return 0;
}