int *a = new int[10];
for(int i =0; i< 10; i++) a[i] =i;
a = new int[20];
then, I printed all, and the result is 0, 1, .., 9, -81823, -912938...
It looks working. So, I checked the address. something wrong.
the information of *a in memory is different from when I use int *a = new int[20];
Ya, you're right.
I tested it, then second a(new int[20]) refer to different address from first a(new int [10]).
Thanks.
Also, i will post something related to it again :)
I hope you will help me again :)