I was going with the theory of casting and not the full here is 100 lines of code.
In thinking about it, I probably should have done a cast'ing tutorial for each one, e.g. const_cast, dynamic_cast etc than just one for them all, so then I could have added at the bottom a coding example of each.
This is one of the reasons why I like doing tutorials/passing on knowledge as such, because what is the point in hiding it to yourself !! and also I get to learn more about what people like in tutorials and probably may learn more about the topic in question.
I don't think you're getting what dcs is saying.
He is trying to tell you that your example is bad, not for the simplicity, but because the const_cast doesn't do anything.
Bookmarks