delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/29/13:52:10

From: "Roberto Henríquez Laurent" <shl24634 AT alumnos DOT inf-cr DOT uclm DOT es>
Newsgroups: comp.os.linux.development.apps,comp.os.msdos.djgpp,comp.unix.programmer
Subject: Re: C++ Passing ostreams by reference to methods, problem
Date: 29 May 1997 08:04:46 GMT
Organization: Universidad de Castilla-La Mancha
Lines: 18
Message-ID: <01bc6c06$d6e88ee0$1b2443a1@pcoec.uclm.es>
References: <01bc6b49$27fce100$1b2443a1 AT pcoec DOT uclm DOT es>
NNTP-Posting-Host: est271.mag-cr.uclm.es
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

	Thanks to anyone who replied me. However, I spent some more time and went
into the code which produced the bug. It had nothing to do with the
fragment I posted. Instead, it was caused because some data were not stored
during a call to a constructor. 
	The trouble was that I had a class with overloaded constructors, and I was
trying to call one of them from another, once in the caller I had some data
in the format the called used. But I suppose I was doing it wrong so that
the call to the constructor never happened. And the compiler didn't say
anything. And the question is:

	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?

	Thanks again...


		Roberto.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019