Initalizing an array before initalizing a pointer to that same array
Posted
by Alex
on Stack Overflow
See other posts from Stack Overflow
or by Alex
Published on 2010-03-26T20:00:37Z
Indexed on
2010/03/26
20:03 UTC
Read the original article
Hit count: 321
I want to initialize an array and then initialize a pointer to that array.
int *pointer;
pointer = new int[4] = {3,4,2,6};
delete[] pointer;
pointer = new int[4] = {2,7,3,8};
delete[] pointer;
How can I do this?
© Stack Overflow or respective owner