just a comment about the latest c++ tips from builder.com ‘Executing a function at program’s startup’, which recommends initialising a program in the constructor of a global object…
i avoid global objects like the plague. this is mainly because the order of their construction, and the context of their allocation, and various other things, is undefined by the language. i find its much more reliable to keep all data within the context of blocks of code.
to solve the problem here, i think its better to use a self initialising singleton with a static function to return a reference. what do people think?
jp