delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/12/05:45:40.1

Newsgroups: comp.os.msdos.djgpp
From: manni DOT heumann AT gmx DOT de (Manni Heumann)
Subject: Re: C++ error
References: <Pine DOT UW2 DOT 3 DOT 95 DOT 1000711191111 DOT 21689A-100000 AT bryggen DOT bgnett DOT no>
X-Newsreader: News Xpress 2.01
Mime-Version: 1.0
Date: Wed, 12 Jul 2000 09:43:35 GMT
NNTP-Posting-Host: dhcp33-228.uni-bielefeld.de
Message-ID: <396c3dcb$1_1@news.uni-bielefeld.de>
X-Trace: 12 Jul 2000 11:43:39 +0200, dhcp33-228.uni-bielefeld.de
Lines: 34
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

djgpp AT delorie DOT com wrote:
>I'm trying to build "Turbo Vision Development Toolkit" by Blaise
>using latest (?) Turbo Vision 1.0.10 and gcc 2.95.2.
> 
>All is well except one file. The problem is in this class definition:
> 
>class sLabel : public TLabel
>{
>public:
>    TView *getLink()            { return (link); }
>    void setLink (TView *aLink) { link = aLink; }
>}; // <- line 103
> 
>gcc gives this error:
> 
>  bshoehor.cpp:103: base `TLabel' with only non-default constructor
>  bshoehor.cpp:103: in class without a constructor
>

I don't know anything about Turbo Vision, so I don't know 
whether sLabel is something you created yourself or whether 
it already is in the library. But what the compiler says is 
that you derive from class TLabel, which only has a 
non-default constructor, i.e. it has only (a) constructor(s) 
that take(s) (an) argument(s). And that means that you have 
to provide a constructor for sLabel that will initialise the 
base class with those required arguments.

Sorry for all the ().


--

Manni

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019