Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

delete an dynamic array

// To deallocate a dynamic array, use this form:
  delete [] name_of_pointer;
// Example:
  int * array = new int[40];	// dynamic array

  delete [] array;		// deallocates the array
 
PREVIOUS NEXT
Tagged: #delete #dynamic #array
ADD COMMENT
Topic
Name
6+1 =