Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

delete dynamic array c++

int* v=new int[10];  // Creating a dynamic array

delete[] v; // delete the dynamic array

v=nullptr; //recommended
 
PREVIOUS NEXT
Tagged: #delete #dynamic #array
ADD COMMENT
Topic
Name
1+2 =