Answers for "how allocate memory for an array in c++"

C++
0

how to increase array memory in c++

int* newArray = new int[newSize];
... copying from old array ...
int* temp = oldArray;
oldArray = newArray;
delete[] temp;
Posted by: Guest on October-15-2021

Code answers related to "how allocate memory for an array in c++"

Browse Popular Code Answers by Language