I was wondering if you guys could help me.
Here are my .h:
Class Doctor {
const string name;
public:
Doctor();
Doctor(string nam
As many have said earlier, the member is 'const' indicates that it has to be initialized during its creation and it is not supposed to change. If at all you have to write an assignment operator for such cases and you cannot skip the assignment of that member variable, then make it 'mutable'.
Remember; from the C++ standard, "casting away constness of an originally declared const variable is undefined behaviour."
HTH, Abhay