Skip to content

Glossary: C++ Basics

Cast

Also written: static_cast, casts

An explicit conversion of a value to another type. `static_cast<double>(cups)` gives `cups` as a `double` and leaves `cups` itself alone.

Where the book teaches it

Related terms

Integer divisionNarrowing