C++
Programming and Technical
What is RTTI?
Read Solution (Total 2)
-
- Run-time type information (RTTI) is a mechanism that allows the type of an object to be determined during program execution. RTTI was added to the C++ language because many vendors of class libraries were implementing this functionality themselves.
- 10 years agoHelpfull: Yes(0) No(0)
- RTTI is an acronym for run time type information. RTTI is a C++ mechanism which allows the type of an object to be determined (or even set) at run-time. RTTI does not exist in Java.
There are three main C++ language elements to run-time type information:
• dynamic_cast operator
• typeid operator
• type_info object which is produced by typeid
The dynamic_cast operator is used for identifying the exact type of an object.
The typeid operator is used to hold the type information returned by the typeid operator. - 6 years agoHelpfull: Yes(0) No(0)
C++ Other Question