Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c++ Subject: Re: Constructor question Message-ID: <653@taumet.com> Date: 4 Apr 91 16:44:24 GMT Article-I.D.: taumet.653 References: <1991Apr2.110623.22219@and.cs.liv.ac.uk> Organization: Taumetric Corporation, San Diego Lines: 14 fuchs@t500e0.telematik.informatik.uni-karlsruhe.de (Harald Fuchs) writes: >When I have to do lots of >common initialization, I put it into a private member function >(e.g. void init ();) and call this function from the constructors. >Unfortunately, this won't work if you have to initialize constant or >reference data members. IMHO a hole in the language. You put these in the constructor header, not the body, and hence not in an init function. Such items may be not be assigned to, but only initialized. I don't necessarily see this as a hole in the language, but does require some repetition in multiple constructors. -- Steve Clamage, TauMetric Corp, steve@taumet.com