The correct way to use the new operator depends on what you are going to do after allocating memory.
int* array = new int[10](); will disable the allocated memory as it starts the int initializer for each int in the array.
int* array = new int[10]; , int , , new. , , , , , , , / .
, . , , , . , . .
- . 0 , , , . , , , , .
, , , std::vector<int>, , , , ( / ), . , , - , .
std::vector<int> safeArray(10);
int* array = &safeArray[0];
, std::vector, , , .