Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #heap #allocated #array
ADD COMMENT
Topic
Name
8+1 =