upcast with protected base unaccessible

Pages: 12
Inheritance implies is-a relationship.

Transmitter is-a Component which is-a Storable.

Ypu are passing pointer pointing to Transmitter object (really) and try to cast it to Component. As Transmitter is-a Component, it works: you can safely cast something to its base class.
Thanks mate, I would invite you a beer if you were where I'm, you deserve it, definitely I have learned more with you than reading hundreds of pages..
Last edited on
Topic archived. No new replies allowed.
Pages: 12