O'Reilly logo

C++ FAQs, Second Edition by Mike Girou, Greg Lomow, Marshall Cline

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 27. Types and RTTI

FAQ 27.01 What is the purpose of this chapter?

image

This chapter explores static and dynamic type checking, both of which are allowed in C++. Its main theme is that static type checking is always a good idea, while the impulse to use dynamic type checking should be carefully controlled. In those cases, such as persistence, where some form of dynamic type checking might be required, runtime type identification (RTTI) should be used.

FAQ 27.02 What is static type checking?

Static type checking, sometimes known as static typing, is when the compiler checks the type correctness of operations at compile time. For example, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required