Is it at all possible to overload the assignment operator for a pointer? A pointer to a base class can be made to point to a derived class, but a pointer to a derived class cannot be made to point to an object of its base class.
let say that we have two classes, rectangle and square
square is derived from rectangle
in C++ you can
rectangle *recP = □
but you cannot
square *squP = &rec;