cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
upcast with protected base unaccessible
Page 2
upcast with protected base unaccessible
Pages:
1
2
Oct 2, 2015 at 8:46pm UTC
MiiNiPaa
(8886)
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.
Oct 2, 2015 at 10:22pm UTC
Winsu
(285)
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
Oct 2, 2015 at 10:22pm UTC
Topic archived. No new replies allowed.
Pages:
1
2