given two pointers :
I'm trying to get the program to have p2 it's own memory so that if I do something like p2[0] = 1;Code:int *p1; int *p2; p1 = new int[10]; memcpy(p2,p1,sizeof(p1));
p1 won't be affected.
Does memcpy create a new memory block like that for me? If not, what does?
<-- trying to aviod constant creation of memory