and run through a loop assigning values in the array, do I have to delete every element in array one at a time or can I just use
delete[] arrlist;
This is a pointer to an array of type float right, not an array to pointer floats, so I don't actually have to loop through to delete each element/pointer correct??
int * foo = newint[10];
delete[] foo; // will kill the entire array (each individual element of the array that is).
delete foo; // will only kill the first bit of the array, but the rest of the array will still be allocated.
int * foo = newint[10];
delete[] foo; // will kill the entire array (each individual element of the array that is).
delete foo; // will only kill the first bit of the array, but the rest of the array will still be allocated.
The delete on line 3 results in undefined behavior. Line 2 is the correct way to do this.