char *p="abcdefg";
string str1="abcdefg";
printf("strlenth=%d\r\n", strlen(p));
printf("strsizeof(*p)=%d\r\n",sizeof(*p));
printf("strlenth()=%d\r\n",str1.length());
printf("strsizeof()=%d\r\n",sizeof(str1));
printf("strsizeof(p)=%d\n",sizeof(p));
输出