|
| Total Answers and Comments: 3 |
Last Update: February 05, 2008 Asked by: vikaspachauri |
|
| | |
|
Submitted by: Sushant Kadadi static_cast is used for all conversions that are well defined. Like float to int. double to int etc.
dynamic_cast is used for type-safe downcasting. For this one must be working with a truly polymorphic hierarchy.(i.e with virtual functions). downcasting is a method to convert the base class pointer to a derived class pointer. incorrect downcast will produce a zero result.
Above answer was rated as good by the following members: es1968 | Go To Top
|