The code below compiles OK but CodeGuard brings up a "Resource type mismatch: a object was expected." error when I run it. Stepping through, the error occurs when trying to 'delete'. Can anyone give me a clue as to what I am doing wrong (something pretty basic no doubt).
--------------------
char *buffer[3];
for(int index = 0; index < 3; index++)
buffer[index] = new char[50];
// do stuff here
for(int index = 0; index < 3; index++)
delete buffer[index];
delete [] buffer;
--------------------
Thanks
--------------------
char *buffer[3];
for(int index = 0; index < 3; index++)
buffer[index] = new char[50];
// do stuff here
for(int index = 0; index < 3; index++)
delete buffer[index];
delete [] buffer;
--------------------
Thanks