I want to make an array of pointers to (int) using "new".
int * a = new ???? ; // (int *) (99) ; ???
thx
/* If you think my question is unclear, please tell me. I am not an English speaker. */
This is a discussion on How to allocate memory for array of pointers using "new"? within the C++ Programming forums, part of the General Programming Boards category; I want to make an array of pointers to (int) using "new". int * a = new ???? ; // ...
I want to make an array of pointers to (int) using "new".
int * a = new ???? ; // (int *) (99) ; ???
thx
/* If you think my question is unclear, please tell me. I am not an English speaker. */
int *a points to an array of integers, not an array of pointers to integers.
To allocate an array of pointers to integers:
int ** a = new int*[size];
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
I got it. thx.