I have a situation where I have class, one of the elements of the class is a boolean. I also have a vector of that class type. Here is what i do:
myclass m1 (initialize the class with the variable set to true)
myclass m2 (initialize the class)
cout << myv << endl;
this prints correctly, and the boolean within a class is set to true.
Now, I add another element:
cout << myv;
Now the printed value shows that the variable is false. Any ideas why this could be? Thank you all.