Why are you trying to delete something that you did not "new"?
You should not be deleting an array that you did not create using
new.
And if you do have something to delete you need to put the statement into a function like this:
1 2 3 4 5 6
|
int* myarray = new int[10];
int main()
{
delete[] myarray;
}
|
Last edited on