char a[] = "hello world";<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> char *p = a; cout<< sizeof(a) << endl; // 12字节 cout<< sizeof(p) << endl; // 4字节 |
void Func(char a[100]) { cout<< sizeof(a) << endl; // 4字节而不是100字节 } |