So may be compiler calls the constructors (in case of global objects) before starting main.
Now the point is:
If the above code was in a .h file. Then?Code:class Beta { public: Alpha alpha; };
They say .h file should not contain any executable stuff?? What is happening here then?
Also we are supposed to redeclare the static variables out side of .h files? Why? Is the situation not the same here?