I've read through similar posts on deleting 2D arrays, but still a little confused.
I have a global array that I want to delete in a funtion named DeleteGroup():
Code:
//global variables:
int FragArray[75][4];
char PKAGroupName[500];
char PKAGroupFrag[500];
void DeleteGroup() {
PKAGroupName[0] = '\0';
PKAGroupFrag[0] = '\0';
for (int i = 0; i < 75; i++){
delete[] FragArray[i];
}
delete[] FragArray;
return;
}
other function {
sets values in array,
calls DeleteGroup() to clear/delete Frag array when finished
}
When I compile my code, I get the warning:
Code:
warning C4154: deletion of an array expression; conversion to pointer supplied
I can't figure out what I'm doing wrong?