21.11 — Overloading typecasts
In lesson , you learned that C++ allows you to convert one data type to another. The following example shows an int being converted into a double: int n{ 5 }; auto d{ static_cast<double>(n) }; // int cast to a double C++ already knows how to convert between the built-in …