![]() |
#2
一眼的笑意2008-09-22 17:17
你用cout<<p<<endl;看看
|
char str[] = "Hello";
char *p = str ;
int n = 10;
cout << sizeof(str)<<endl;
cout<<sizeof(p)<<endl;
cout<<sizeof(n)<<endl;
为什么输出的结果是6,4,4,除了第一个有点眉目外,其他的我自己解释不了。谁能帮忙解释一下