From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John bebbington" To: help-gcc@gnu.org Subject: order of constuctors at program start-up Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: <84icuj$6a$1@news07.btx.dtag.de> X-SW-Source: 1999-12n/msg00391.html Message-ID: <19991231222400.HDbFxVfOrHV-WuqQpARk1Z-NK6P6qz6kCWCYrp7nQ7E@z> 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" ?