G'day,
If you find you have to convert a derived class from one type to another derived type then that is a smell that the initial design has problems.
My gut feeling here is that you are representing a Manager object incorrectly.
Go back to basics and think in OO terms where your base class (Contact) contains the common elements of both Employee and Manager objects. Any derived objects are just specialisations of the base class.
In this case isn't a Manager an instance of an Employee?
Both the Manager and Employee classes should have a reportsTo data member which is also of type Employee.
The only difference I can see at the moment is that a Manager object now has a collection of Employee objects that are their own directReports. This should probably be implemented as a pointer to a container of Employee objects.
I can't think of any specialisation in behaviour that needs separating out an Employee object from a Manager object.
Hmmm, maybe make the base class Person that contains Contact details in it.
Edit: Sorry, from your comment I guess I wasn't clear enough. What I described does not lead to two separate classes both directly derived from your Contact class so that you have to change an instance of an Employee to a Manager during runtime which was your original question.
That is, I don't think you should have two derived classes, an Employee and a Manager, directly inheriting from your Contact class.
Aren't both these instances of types of people who are employed by a company? Why distinguish between a Manager and an Employee? Is an Employee no longer an Employee if they become a Manager?
Having two derived classes, a Manager and an Employee, is completely wrong IMHO. Have you tried breaking things down in terms of "isa" and "has a" relationships. Then you can see that your basic structure is wrong.
To say an Employee "isa" Contact just doesn't make sense. More likely an Employee "isa" Person and a Person "has a" set of Contact details.
Maybe derive the Manager class as a specialisation of an Employee? An Employee "isa" Person. A Manager "isa" Employee which "isa" Person.
HTH
cheers,