I've got a quick question about OOP design.
Would you say that it's good practice to put code into a class' constructor and destructor that refers to variables/objects outside of that class?
For example, say I had an emloyee class and also had an STL list of pointers to all the employee objects. Would it then be good practice to add and remove the employee from the list from within the constrcutor/destructor, or should that really be done outside? The impression I've always got is that contructors and destructors are supposed to be for initialising/destroying the inner workings of a class, and the user of it should never need to know what's happening.
By manipulating variables outside of the class it becomes less modularised and means you have to know something about how the functions are doing what they are. If someone else were to use my class they may find things a bit odd without reading the class code, which kind of defeats the object of it all
Any opinions greatly appreciated. I hope I've explained it pretty well, because it is a bit of a blurry issue rather than a straightforward problem.