Home > DeveloperSection > Forums > What is dynamic_cast in c ?
Madam Walker
Madam Walker

Total Post:22

Points:154
Posted on    June-13-2013 7:57 AM

 Visual C++ Visual C++ 
Ratings:


 1 Reply(s)
 854  View(s)
Rate this:
Hi Expert,

What is dynamic_cast in c++?

Thanks in advance.


AVADHESH PATEL

Total Post:604

Points:4228
Posted on    June-14-2013 1:50 AM

Hi,

Dynamic_cast is a casting operator. The dynamic_cast operator performs a run-time cast that verifies the validity of a cast. If at the time dynamic_cast is executed, the cast is invalid,the cast fails.the general form of dynamic cast is :

dynamic_cast<target_type>(expr)

Don't want to miss updates? Please click the below button!

Follow MindStick