Mail Archives: djgpp/1996/04/30/21:14:52
> One problem you can have is if you use anything that needs to be
> initialized too. Examples are the predefined stream (cin, cout, cerr) or
> files (stdin, stdout, stderr), and parts of the run-time library. The
> order can and will vary without much rhyme or reason.
stdin, stdout, stderr, stdprn, and stdaux are all pre-initialized by
the compiler. They will be available when static objects are
constructed.
All other libc startup is done before static constructors as well.
The only consideration is the sequence of static construction (yours
vs cout, for example). Note that the conio functions are initialized
this way, so they may not be available until main().
- Raw text -