public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How do I control the order of constuctors
@ 1999-12-31  6:21 John bebbington
  1999-12-31  8:39 ` Greg Chicares
  1999-12-31 22:24 ` John bebbington
  0 siblings, 2 replies; 7+ messages in thread
From: John bebbington @ 1999-12-31  6:21 UTC (permalink / raw)
  To: help-gcc

Hello,
Can anyone tell me how to control the order of calling class constuctors
which occur before the main().

I have several c++ classes that create object intances in their .cc files.
Example:

file a.h:

class a { }
external a;

file a.cc
......
 a the_a;

file main.cc
#include "a.h"
#include "b.h"
main () {}

question: how can I ensure that object "the_a" is contructed before "the_b"
?




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-31  6:21 How do I control the order of constuctors John bebbington
1999-12-31  8:39 ` Greg Chicares
1999-12-31 22:24   ` Johnny Favorite (it means "Writhing Tentacle of Death")
2000-01-01  3:24     ` John bebbington
2000-04-01  0:00       ` John bebbington
1999-12-31 22:24   ` Greg Chicares
1999-12-31 22:24 ` John bebbington

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).