array on heap in c++ code example
Example: heap allocated array in c ++
//Heap array
std::array<myarray, 3> stack_array; // Size must be declared explicitly.VLAs
//Stack array
std::vector<myarray> heap_array (3); // Size is optional.
//Heap array
std::array<myarray, 3> stack_array; // Size must be declared explicitly.VLAs
//Stack array
std::vector<myarray> heap_array (3); // Size is optional.