Gidday,
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().Code:class SHIP { public: virtual AnsiString GetName(); };
I have then created an array of SHIP's (SHIP * Ships[10]), 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.Code:CRUISESHIP * Temp = new CRUISESHIP; /* Do some other stuff */ Ships[0] = Temp;



LinkBack URL
About LinkBacks


