|
bad_castclass
<typeinfo>
class bad_cast; Exception thrown on failure to dynamic cast
Type of the exceptions thrown by dynamic_cast when they fail the run-time check performed on references to polymorphic class types. The run-time check fails if the object would be an incomplete object of the destination type. Its member what returns a null-terminated character sequence identifying the exception. Some functions in the standard library may also throw this exception to signal a type-casting error. Example
Possible output:
See also
|