> Doesn't that mock the C++ goal of avoiding globals in code? C++ has no such goal. Maybe it's considered bad design or not the best C++ way, but that's a philosophic issue. In C++, a global is just as C++ good a citizen as a local. And don't forget, main( ) is global! C++ :-)
> I'm not saying I never use globals, I do think they have a place (I > would not have thought of your little class in that way, but still) - > but I was always under the impression that global variables was a C > throwback and frowned on in C++? A C throwback and frowned in C++, yes. But it's still legal and has its own uses. Of course, I, like Paul, have never met any case where I need to perform a module wide operation at module load time; I was just suggesting that globals can be used should the need arise. But now that I think of it, why not try DllGetClassObject( ) instead? Of course that doesn't unfortunately provide a symmetric temination hook which you can use to auto-execute your termination code... And still for simple (de)initializations, we have DllMain (surprise!). ------------- Ehsan Akhgari Farda Technology (www.farda-tech.com) List Owner: [EMAIL PROTECTED] [ Email: [EMAIL PROTECTED] ] [ WWW: http://www.beginthread.com/Ehsan ] Light without eyes illuminates nothing.
