typeid

Syntax:

    typeid( object );

The typeid operator returns a reference to a type_info object that describes `object`.

If `object` is a null pointer, then the operation will throw a std::bad_typeid exception.

NOTE The C++98 standard requires that header file <typeinfo> to be included before operator typeid is used within a compilation unit. Otherwise, the program is considered ill-formed.