I'm using CBuilder 6 and I have a class that looks something like this:
I then have classes (Eg: CRUISESHIP, CARGOSHIP) that inherit this and overwrite GetName().
virtual AnsiString GetName();
I have then created an array of SHIP's (SHIP * Ships), and when the user creates a new CRUISESHIP or CARGOSHIP it is placed into this array.
This allows me to write:
And there are no problems. The problem is, when I try to delete any of the Ships, I get an error saying Assert failed and some other stuff.
CRUISESHIP * Temp = new CRUISESHIP;
/* Do some other stuff */
Ships = Temp;