sizeof的值
#include <iostream>
using namespace std;
int main()
{
char str[]="hello";
char *p=str;
cout<<sizeof(str)<<endl;
cout<<sizeof(p)<<endl; //这里不懂了为什么会是4呢
system("PAUSE");
return 0;
}
#include <iostream>
using namespace std;
int main()
{
char str[]="hello";
char *p=str;
cout<<sizeof(str)<<endl;
cout<<sizeof(p)<<endl; //这里不懂了为什么会是4呢
system("PAUSE");
return 0;
}