public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* order of constuctors at program start-up
@ 1999-12-31  6:06 John bebbington
  1999-12-31 22:24 ` John bebbington
  0 siblings, 1 reply; 2+ messages in thread
From: John bebbington @ 1999-12-31  6:06 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] 2+ messages in thread

* order of constuctors at program start-up
  1999-12-31  6:06 order of constuctors at program start-up John bebbington
@ 1999-12-31 22:24 ` John bebbington
  0 siblings, 0 replies; 2+ messages in thread
From: John bebbington @ 1999-12-31 22:24 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] 2+ messages in thread

end of thread, other threads:[~1999-12-31 22:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-31  6:06 order of constuctors at program start-up John bebbington
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).