Answers for "c++ allocate dynamic with initial values"

C++
0

c++ allocate dynamic with initial values

int length = 50;
int *array = new int[length]();
// returns 50 length array of 0
Posted by: Guest on March-29-2020

Code answers related to "c++ allocate dynamic with initial values"

Browse Popular Code Answers by Language