#include<iostream>
using namespace std;
int main()
{
int* q = new int[3];
cout << &q[0] << endl;
cout << q << endl;
cout << &q << endl; // why here is different?
int p[3];
cout << &p[0] << endl;
cout << p << endl;
cout << &p << endl;
return 0;
}
here is my code, I use new to create dynamic arrays, but the array address really confused me, why &q is different?