Hi Andreas,
MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h)
{
...
is equal to
MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h) : TGMainFrame()
{
...
TGManFrame class doesn't have default constructor, i.e. TGMainFrame::TGMainFrame()
Yours compler complains for the same:
"main.c++:29: no matching function for call to `TGMainFrame::TGMainFrame ()'"
HTH. Regards. Valeriy
> Hi ROOTERS,
>
> how come the following works:
>
> MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h)
> : TGMainFrame(p, w, h)
> {
>
> ... code
>
> }
>
> but the following doesn't:
>
> MyMainFrame::MyMainFrame(const TGWindow *p, UInt_t w, UInt_t h)
> {
>
> fMain = new TGMainFrame(p, w, h);
> ... code
>
> }
>
> wher fMain is of course in the .h file as:
>
> TGMainFrame *fMain;
>
> I get the following error:
> main.c++: In method `MyMainFrame::MyMainFrame (const TGWindow *,
> unsigned int, unsigned int)':
> main.c++:29: no matching function for call to `TGMainFrame::TGMainFrame
> ()'
> /afs/cern.ch/sw/root/v3.05.04/rh73_gcc2952/root/include/TGFrame.h:369:
> candidates are:
> TGMainFrame::TGMainFrame (const TGWindow *, unsigned int, unsigned int,
> unsigned int = kVerticalFrame)
> /afs/cern.ch/sw/root/v3.05.04/rh73_gcc2952/root/include/TGFrame.h:410:
> TGMainFrame::TGMainFrame (const TGMainFrame &)
>
>
> Thanks in advance
> Andi
>
> =======================================================================
> Andreas Wildauer
> CERN/EP ATC, mailbox E25310, CH-1211 Geneva 23, Switzerland
> office 40 3-D06
> email Andreas.Wildauer@cern.ch
> tel +41 22 76 71779
> =======================================================================
>
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET