Dynamic Cast
In the C++ programming language, the dynamic_cast operator is a part of the run-time type information (RTTI) system that performs a typecast. Unlike an ordinary C-style typecast, a type safety check is performed at runtime, and if the types are not compatible, an exception will be thrown (when dealing with references) or a null pointer will be returned (when dealing with pointers). In this regard, dynamic_cast behaves like a Java typecast.
Read more about Dynamic Cast: Example Code
Famous quotes containing the words dynamic and/or cast:
“Knowledge about life is one thing; effective occupation of a place in life, with its dynamic currents passing through your being, is another.”
—William James (18421910)
“You may melt your metals and cast them into the most beautiful moulds you can; they will never excite me like the forms which this molten earth flows out into. And not only it, but the institutions upon it are plastic like clay in the hands of the potter.”
—Henry David Thoreau (18171862)