I am also still pretty new to class design, so I would like to ask: wouldnt it be better to ditch the getter/setter functions, and instead have member functions that perform specific tasks related to what the class represents?
In this case, Syneris' example class seems to keep the num and ch member variables pretty much separate, as if it is nothing more than a shell with getters/setters around its member variables. I think it might as well be a struct or leave the member variables public.
However, if we ignore ch (since it doesnt seem to be used anyway), and an int was convertible to MyClass through say a constructor that accepts an int, and an appropriate operator== existed, then we should be able to do:
Code:
ClassList.remove_if(std::bind2nd(std::equal_to<MyClass>(), 1));