What is the diffrence between static_cast and dynamic_cast in RTTI

What is the diffrence between static_cast and dynamic_cast in RTTI

Static_cast from a base class pointer to a derived class pointer. It will do this properly for the up cast, And also properly for the downcast, If the object is actually a derived class. If the object wasn't, we'ld get a pointer as if it were, but this might be very bad.
> RTTI is not an option and It is an embedded product. Therefore dynamic_cast is not an option.

By:Umang
Date:2001-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher