From: "John bebbington" <John.Bebbington@t-online.de>
To: help-gcc@gnu.org
Subject: order of constuctors at program start-up
Date: Fri, 31 Dec 1999 06:06:00 -0000 [thread overview]
Message-ID: <84icuj$6a$1@news07.btx.dtag.de> (raw)
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"
?
WARNING: multiple messages have this Message-ID
From: "John bebbington" <John.Bebbington@t-online.de>
To: help-gcc@gnu.org
Subject: order of constuctors at program start-up
Date: Fri, 31 Dec 1999 22:24:00 -0000 [thread overview]
Message-ID: <84icuj$6a$1@news07.btx.dtag.de> (raw)
Message-ID: <19991231222400.HDbFxVfOrHV-WuqQpARk1Z-NK6P6qz6kCWCYrp7nQ7E@z> (raw)
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"
?
next reply other threads:[~1999-12-31 6:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-31 6:06 John bebbington [this message]
1999-12-31 22:24 ` John bebbington
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='84icuj$6a$1@news07.btx.dtag.de' \
--to=john.bebbington@t-online.de \
--cc=help-gcc@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).