O'Reilly logo

Sams Teach Yourself C++ in One Hour a Day, Eighth Edition by Siddhartha Rao

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

Lesson 13. Casting Operators

Casting is a mechanism by which the programmer can temporarily or permanently change the interpretation of an object by the compiler. Note that this does not imply that the programmer changes the object itself—he simply changes the interpretation thereof. Operators that change the interpretation of an object are called casting operators.

In this lesson, you learn

Image The need for casting operators

Image Why C-style casts are not popular with some C++ programmers

The four C++ casting operators

The concepts of upcasting and downcasting ...

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