Dynamic Cast

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:

    Magic is the envelopment and coercion of the objective world by the ego; it is a dynamic subjectivism. Religion is the coercion of the ego by gods and spirits who are objectively conceived beings in control of nature and man.
    Richard Chase (b. 1914)

    There may sometimes be ungenerous attempts to keep a young man down; and they will succeed too, if he allows his mind to be diverted from its true channel to brood over the attempted injury. Cast about, and see if this feeling has not injured every person you have ever known to fall into it.
    Abraham Lincoln (1809–1865)