Thursday, January 21, 2010

C++98: dynamic_cast

When a dynamic_cast fails on a pointer, it returns 0; on a reference, it throws std::bad_cast exception.
Reference: C++ Common Knowledge by Stephen C. Dewhurst. Addison-Wesley, 2005., p. 32.

No comments:

Post a Comment