Hi everyone.I've got a question on dynamic cast.Dynamic_cast allows us to downcast a data type from one to a more specific one in the same hierarchy.
But why not declare the variable we need to the appropriate type during programming time rather than downcasting it at run time?
I don't think that the developers of C++ included dymanic_cast by mistake or for the sake of commands redundancy... Then why? What's its additional use and benefits??
tlly 0 Newbie Poster
Narue 5,707 Bad Cop Team Colleague
dubeyprateek 26 Junior Poster
sahu74 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.