Re: Inhereting

Rene Brun (Rene.Brun@cern.ch)
Mon, 12 Jan 1998 14:44:16 +0100


Selim Issever wrote:

> Dear all,..
>
> does anyone see what wrong with this?
>
> >>> file ab.C ----------------------
> class TC : public TCanvas {
> public:
> TC():TCanvas("c", "abc") {
>
> }
> private:
>
> };
>
> void ab() {
> cout << "start" << endl;
> TC a;
> cout << "end" << endl;
> }
> <<< -------------------------------
>
> >>> root session ------------------
> root [0] .x ab.C
> start
> end
> Fatal in <operator delete>: storage area overwritten
> aborting
> IOT trap/Abort (core dumped)
> <<< -------------------------------

A class defined interactively cannot inherit from a compiled class.

Rene Brun