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