Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!rutgers!orstcs!mist!chouc From: chouc@mist.CS.ORST.EDU (Chou Chung-Di) Newsgroups: comp.lang.c++ Subject: Re: Once again, Zortech C++ problem Message-ID: <12125@orstcs.CS.ORST.EDU> Date: 18 Aug 89 18:02:26 GMT References: <24@<19036> <4800072@m.cs.uiuc.edu> Sender: usenet@orstcs.CS.ORST.EDU Reply-To: chouc@mist.CS.ORST.EDU (Chou Chung-Di) Organization: Oregon State Univ. -- Computer Science Lines: 27 In article <2100@dataio.Data-IO.COM> Walter wrote: >ZTC 1.07 has a problem in that functions return a struct by >value return it in a static memory location, instead of in a >temporary on the stack. This will be fixed in the next >version. Appreciate if some one can answer my question (examples are great help) Do I have to initialize all the global objects inside the main program? I got this impression from Zortech's "C++ TOOLS" book (second paragraph, page 21) and the reason for asking this is that my (globally declared) objects are trashed whenever the constructors for those objects are called outside the main program. Thanks in advance for your time. ************************************************************ Tony Chou Department of Industrial & Manufacturing Engineering Oregon State University Corvallis, OR 97331 (503) 752-3421 ************************************************************