Newsgroups: comp.os.msdos.djgpp,comp.lang.c++ From: ark AT research DOT att DOT com (Andrew Koenig) Subject: Re: Problems using CYGWIN X-Nntp-Posting-Host: raptor.research.att.com Message-ID: Sender: nntp AT research DOT att DOT com Organization: AT&T Research, Florham Park, NJ References: <373FBB9C DOT FE26B278 AT netvigator DOT com> Date: Mon, 17 May 1999 13:53:31 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article <373FBB9C DOT FE26B278 AT netvigator DOT com>, NG Chi Fai wrote: > Please help solve the problem. It seems the Segmentation fault happens > after the cout << line. However, there is something wrong before the > cout << line because the output data are corrupted. Your class is missing a copy constructor, which it uses here: > a duplicate(void) > { > a temp; > temp=*this; > return temp; // uses the copy constructor > }; -- Andrew Koenig ark AT research DOT att DOT com http://www.research.att.com/info/ark