home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 20083 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.2 KB

  1. Path: sparky!uunet!crdgw1!rpi!uwm.edu!spool.mu.edu!agate!doc.ic.ac.uk!pipex!demon!trmphrst.demon.co.uk!nikki
  2. From: nikki@trmphrst.demon.co.uk (Nikki Locke)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: When Are Global Objects with a Constructor Initialized?
  5. Message-ID: <728160272snx@trmphrst.demon.co.uk>
  6. Date: 27 Jan 93 11:44:32 GMT
  7. References: <1993Jan25.024402.10801@alchemy.chem.utoronto.ca>
  8. Sender: usenet@demon.co.uk
  9. Reply-To: nikki@trmphrst.demon.co.uk
  10. Organization: Trumphurst Ltd.
  11. Lines: 18
  12. X-Mailer: cppnews $Revision: 1.31 $
  13.  
  14. In article <1993Jan25.024402.10801@alchemy.chem.utoronto.ca> mbersohn@alchemy.chem.utoronto.ca (M. Bersohn) writes:
  15. > Hello C++ experts:
  16. >     Does anyone know when global objects of a class with
  17. > a constructor that does initializations are initialized,
  18. > at compile time or at the beginning of execution?
  19.  
  20. At run time.
  21.  
  22. >      One might ask "Why care?". I intend to have
  23. > over 100,000 of such objects so I don't want to 
  24. > proceed in this way if they all have to be initialized
  25. > at the beginning of every run of the program.
  26.  
  27. Looks like you will have to rethink, then.
  28.  
  29. -- 
  30. Nikki Locke,Trumphurst Ltd.(PC and Unix consultancy) nikki@trmphrst.demon.co.uk
  31. trmphrst.demon.co.uk is NOT affiliated with ANY other sites at demon.co.uk.
  32.