![]() |
#2
rjsp2018-10-31 12:33
|
//不是说数组变量是指向,它元素中的首地址吗,为什么char类型的不是。
int tt[]= {1,2,3,4};
cout << tt << endl; //0x22ff40
cout << &tt[0] << endl; //0x22ff40
char char_1[]="hello";
cout << (void *)char_1[0]<< endl; //0x68
cout << &char_1 <<endl; //0x22ff40