Quote Originally Posted by D_Drmmr View Post
The solution is to stop trying to run code outside of main. Run it inside main or a function (indirectly) called from main.
Global variables are evil for a reason. See http://www.parashift.com/c++-faq/global-vars.html
what you can tell me about static class members?
but i only see examples with class's names and not with objects\instances names... but what you can tell me?