Thanks for the replies people
I was trying to figure out the singleton class and at one point myinputclass was initialized just like i wanted, the problems began when i wanted to use it :P
When i called a function from a object of myinputclass that returns a std::string and displayed the returned string the program freezed.
I will try the diferent examples of singleton.
Thanks for help.