Article View: alt.comp.lang.learn.c-c++
Article #344Re: class definition
From: Jeff Connelly
Date: Wed, 01 Dec 1999 00:00
Date: Wed, 01 Dec 1999 00:00
61 lines
2525 bytes
2525 bytes
This:
class derived : public base {
public:
derived() : base() {} //What the hell does this line of
is the same as this:
class derived : public base {
public:
derived() {}
which is the same as this:
class derived : public base {
It is just doing what the compiler would do behind the covers anyway.
I can think of no reason for someone to actually write that code.
Perhaps it is unfinished, or perhaps there was more there that got
removed, or perhaps someone was just experimenting? It's rather
confusing to look at syntactically - if you have the option I would
remove it.
In article <38436F07.55AD215F@netvigator.com>,
Bruce Lai <arraylai@netvigator.com> 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.
>
> 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!!
> --
> Bruce Lai
> Email: arraylai@netvigator.com
> ICQ: 13949789 (scrop)
>
>
--
Regards,
Jeff
Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID:
<823n9s$m64$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<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: 109fba,1c86b0ff88e63dee X-Google-Attributes: gid109fba,public X-Google-Thread: 114592,1c86b0ff88e63dee X-Google-Attributes: gid114592,public From: Jeff Connelly <jeff_connelly@mgv.com> Subject: Re: class definition Date: 1999/12/01 Message-ID: <823n9s$m64$1@nnrp1.deja.com> X-Deja-AN: 555262224 References: <38436F07.55AD215F@netvigator.com> X-Http-Proxy: 1.0 RAL_NT5, 1.0 x37.deja.com:80 (Squid/1.1.22) for client 216.27.36.2 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Dec 01 17:53:02 1999 GMT X-MyDeja-Info: XMYDJUIDjeffnc Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c++,borland.public.cpp.language X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)