dynamic_cast throws bad_cast exception if you cast a reference but as I know in the standard pointers are considered as references, i.e. a pointer is a type of a reference.
So should I get bad_cast when casting pointers?
This question arose from the try-catch block from this page. Is this try-catch block inappropriate?
No with pointers in case of a bad cast,
dynamic_castwill return anull.Also, dynamic_cast works only on Polymorphic classes, So if you are talking about built in data types(from the link in your question) then
static_castis what you should be using.And btw, References are NOT pointers.