Hi Franclin,
Downcasting from a derived class to a parent class is possible with the
dynamic_cast operator. From what you have written in your mail, it looks like
the snippet won't compile at all, I can bet something it will as I tried it a
couple of hours ago. Try it yourself and let me know.
Hi Ulrich,
I am not sure if you have understood the code snippet I provided. I am also
unsure about your C++ knowledge but I think it is better than mine.
From the code (and the title of the post), it is easy to see that I am
downcasting from a Drawable object to a Geometry one. The shapeDrawa
2 matches
Mail list logo