Thread View: comp.std.c++
1 messages
1 total messages
Started by Alexandre Oliva
Tue, 27 Feb 1996 18:39
Re: Calling X(int) from X()'s init list
Author: Alexandre Oliva
Date: Tue, 27 Feb 1996 18:39
Date: Tue, 27 Feb 1996 18:39
27 lines
1568 bytes
1568 bytes
Anders Lindback writes:
> David Byrden <100101.2547@compuserve.com> wrote:
>> Why is it not allowed to delegate the initialisation to another
>> constructor?
> Well, one could use a similar thing using a member function:
> X (int i) { init(i); }
> X () { init(34); }
> where init is a member function for class X.
Not if you have to initialize base classes or references, or member
objects without default constructors.
--
Alexandre Oliva
oliva@dcc.unicamp.br
Universidade Estadual de Campinas, S~ao Paulo, Brasil
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads