Home Segments Index Top Previous Next

365: Mainline

The concept of pointer casting is related to the concept of number casting. In Segment 73, you learned that you can call for an explicit conversion of a number belonging to one type into a number belonging to another type, as in the following example:

*-- An integer 
| 
|     *-- Casting specification 
|     | 
|     |   *-- A floating-point number 
|     |   | 
v     v   v 
i = (int) f;