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.
Thursday, January 21, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment