Hello,
I have a class with as many objects I need. I am changing the value of some member variables individually here and there, however, now I want to be able to change one specific member variable of all objects e.g. bool visibility at once, so that all objects wll have visibility=OFF.
I thought of creating a vector of pointers to all objects, or an array of references and then making a static member function which does that by looping through all existing objects. But then again if I decide to have other member variables to change as well, I would need to have all sorts of funcs which do the trick for various member variables.
I have read ages ago there is an easy way out somehow.. Any help would be appreciated,
&Cheers,
poliet