bool \"bar\" is by default true, but it should be false, it can not be initiliazied in the constructor. is there a way to init it as false without making it static?
C / C++ don't initialize variables for you at all. The memory location which is now in use by bar had a value in it which is interpreted as "true". This will not always be the case. You must initialize it in your constructor.