On Wed, 17 Oct 2007, Mickey Mathieson wrote: >> Yes. And also, which object on the heap is pu >> pointing to? It seems to me >> that pointers that are declared to point to a base >> class should not be >> able to point to inherited classes too without >> problems with e.g. pointer >> arithmetic?! >> > a pointer to a derived class is type-compatible with a > pointer to its base class. Polymorphism. > > The pu pointer is pointing to the Over object.
Yet it can't access any methods in Over that aren't in Under, right? So what is the point of doing that? I just can't see what the benefits are of syntactically allowing it in the first place?!
