🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Alexandre Oliva Tue, 27 Feb 1996 18:39
Re: Calling X(int) from X()'s init list
#3522
Author: Alexandre Oliva
Date: Tue, 27 Feb 1996 18:39
27 lines
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