🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #347

Re: class definition

#347
From: Karl Heinz Buchegger
Date: Tue, 30 Nov 1999 00:00
39 lines
2093 bytes

Bruce Lai wrote:
> 
>     Hello great programmers, I got a question here. Please take a look
> at the code below.
> 
>     class derived : public base {
>         public:
>             derived()  :  base() {}  //What the hell does this line of
> code do?
>     }
> 
> I see this kind of declaration in an example of OWL programming and in
> the case derived is TDrawApp and base is TApplication.

It is an initialiser list. Basically it calls the constructor of
the base class whenever an object of class derived is constructed.

> 
> Well, something out of the content but I saw this in my C++ book and I
> can't make clear of them:
> 
>     int *(*(*ifunct_ptr)(int))[5];
>     float (*(*ffunct_ptr)(int,int))(float);
>     typedef double (*(*(*dfunct_ptr)())[5])();
>     (*(*funtion_ary_ptrs())[5])();
>     int func() const;
> 
> Anyone can help me clarify them? I'd prefer a copy of reply to my email
> box as well. THANKS!!

Dont want to flame you. Leave that alone, until you have learned
a lot more (don't apply for the NY-marathon if you just started
walking).

-----------------------------------------------------------
Karl Heinz Buchegger
kbuchegg@gascad.at
Technical Details
Message-ID: <38439D06.724DF432@gascad.at>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38436F07.55AD215F@netvigator.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f8d38,1c86b0ff88e63dee
X-Google-Attributes: gidf8d38,public
X-Google-Thread: 114592,1c86b0ff88e63dee
X-Google-Attributes: gid114592,public
X-Google-Thread: 109fba,1c86b0ff88e63dee
X-Google-Attributes: gid109fba,public
From: Karl Heinz Buchegger <kbuchegg@gascad.at>
Subject: Re: class definition
Date: 1999/11/30
Message-ID: <38439D06.724DF432@gascad.at>
X-Deja-AN: 554785169
Content-Transfer-Encoding: 7bit
References: <38436F07.55AD215F@netvigator.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@telecom.at
X-Trace: leech.telecom.at 943955259 20730 194.118.74.23 (30 Nov 1999 09:47:39 GMT)
Organization: GASCAD
Mime-Version: 1.0
NNTP-Posting-Date: 30 Nov 1999 09:47:39 GMT
Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c++,borland.public.cpp.language