I am trying to re-size an array passed as a parameter in a function. The problem is once I am done copying the array and I go to delete the old array the program fails.
I get this error which I have been unable to solve. Is what I am trying to do legal?
expression:_BLOCK_TYPE_IS_VALID
1 2 3 4 5 6
void function(int oldArray[])
{
create newArray and copy oldArray data into newArray
delete[] oldArray;
oldArray = newArray;
}