From: Erik Max Francis Newsgroups: comp.os.linux.development.apps,comp.os.msdos.djgpp,comp.unix.programmer Subject: Re: C++ Passing ostreams by reference to methods, problem Date: Thu, 29 May 1997 12:54:54 -0700 Organization: Alcyone Systems Lines: 27 Message-ID: <338DDF0E.23B5C36D@alcyone.com> References: <01bc6b49$27fce100$1b2443a1 AT pcoec DOT uclm DOT es> <01bc6c06$d6e88ee0$1b2443a1 AT pcoec DOT uclm DOT es> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit Precedence: bulk Roberto Henríquez Laurent wrote: > If I have 2 constructors, e.g.: Class(int a, int b) and > Class(String xyz), > how should I call Class (int, int) after processing the String xyz in > the > other constructor? You can't, unless you were to make a third member function which did the (int, int) initialization and have each constructor call that. In fact, even the syntax for calling a constructor won't do what you think: Class(2, 3); presuming there is a Class::Class(int, int) constructor will not call the constructor, it will create a temporary object and do nothing with it. -- Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com Alcyone Systems / web / http://www.alcyone.com/max/ San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W \ "Covenants without the sword / are but words." / Camden