G
guoliang
help:
i try the code:
"
char str[]={'h','e','l','l','o','\n','\0'};
char *pstr=str;
printf("sizeof=%d\n",sizeof(str));
printf("sizeof=%d\n",sizeof(pstr)); //i want to get sizeof(str) not
sizeof(void *)
"
how can i use pstr to get sizeof string which it point?
thx!
i try the code:
"
char str[]={'h','e','l','l','o','\n','\0'};
char *pstr=str;
printf("sizeof=%d\n",sizeof(str));
printf("sizeof=%d\n",sizeof(pstr)); //i want to get sizeof(str) not
sizeof(void *)
"
how can i use pstr to get sizeof string which it point?
thx!