Re: [C++] Having some troubles with ctors
From: Alwyn (dt015a1979_at_mac.com.invalid)
Date: 07/31/04
- Next message: Francis Glassborow: "Re: [C++] Having some troubles with ctors"
- Previous message: Chris \( Val \): "Re: [C++] Having some troubles with ctors"
- In reply to: Chris \( Val \): "Re: [C++] Having some troubles with ctors"
- Next in thread: Francis Glassborow: "Re: [C++] Having some troubles with ctors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 31 Jul 2004 14:21:20 +0100
In article <2n1ka7Fqsgj6U1@uni-berlin.de>, Val \
<chrisval@bigpond.com.au> wrote:
> However, my response was due to trying to initialise
> a base class, as in:
> b( char const* s ) : a( str ) {}
>
> ...where 'a' is not a base class of 'b'.
No, that would not work for the reason you stated. If you are
initialising a data member of the class, you have to give the name of
that member, not that of its class.
It would help disambiguate things if it was arranged that class names
started with capital letters and the names of instances with
miniscules.
Alwyn
- Next message: Francis Glassborow: "Re: [C++] Having some troubles with ctors"
- Previous message: Chris \( Val \): "Re: [C++] Having some troubles with ctors"
- In reply to: Chris \( Val \): "Re: [C++] Having some troubles with ctors"
- Next in thread: Francis Glassborow: "Re: [C++] Having some troubles with ctors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|