In C++, object construction and destruction can involve executing user code. Therefore, it is important to understand which initializations happen before entry to main and which destructors are invoked after exit from main. (For detailed information about construction and destruction of objects, see Constructors and Destructors in Chapter 11.)
The following initializations take place prior to entry to main:
Microsoft Specific
In Microsoft C++, global static objects are initialized before entry to main.
END Microsoft Specific
Global static objects that are mutually interdependent but in different translation units may cause incorrect behavior.