There is also a difference in the dynamic initialization of globals (see here ). To summarize, if you had:
static int count = bar(); int main () { static int count = foo (); }
The call to 'foo' will be executed when main is executed, but standard (C ++ '03) does not require a call to bar at all!
source share