Stimmt es, dass C++ - Array ein Const-Zeiger in C++ ist?Sind Arrays in C++ ein Const-Zeiger?
http://www.cplusplus.com/forum/articles/10/#msg1381
So Deshalb x
und &x
das gleiche, wenn sie Zeiger?
#include<iostream>
using namespace std;
int main() {
int x[5];
int *y = new int[5];
cout << "&x : " << &x << endl;
cout << "x : " << x << endl;
cout << endl;
cout << "&y : " << &y << endl;
cout << "y : " << y << endl;
return 0;
}
Ausgang:
&x: 0xbfec4ccc
x : 0xbfec4ccc
&y: 0xbfec4ce0
y : 0x8961008
Link zu ideone von oben Code: http://ideone.com/3JRZd
Sie können das gleiche Problem mit 'sizeof' anzeigen. 'sizeof (x)! = sizeof (y)'. (In Ihrer Idee ein Link.) –