Posted By: jerryiii (Vsude dobre, v CR nejhur) on 'CZprogram'
Title:     Re: C++ a inherited?
Date:      Tue May 13 11:28:58 2003

>  > TResultTabSheet zdedena z TResulSheet tak to bude v C++ asi 
> takhle: > 
> > class TResultTabSheet : public TResultSheet
> > {
> >     TResultTabSheet(TComponent AOwner) : TResultSheet(AOwner), pc(this)
> >     {
> >         pc.Align = alClient;
> >         pc.MultiLine = true;
> >         pc.Parent = this;
> >     }
> > }
> > 
> 
> Presneji by melo byt pc inicializovano na pc(new TPageControl(this)), podle 
> vyse uvedeneho prikaldu, ale to je detail, na ktery by casem jiste prisel
> sam 
> :-). 

To zalezi, to cos napsal by platilo pouze pokud by pc byl ukazatel. Pokud je 
to objekt tak to je jak sem napsal ja, nemluve o tom ze se potom nemusis 
starat o rucni destrukci (coz bys u ukazatele musel).

          Jerry III

Enough said ...
http://jerryiii.home.sprynet.com/mica/index.htm

Search the boards