C++ Programming Guide

Type Checking

A compiler, or interpreter, performs type checking when it ensures that operations are applied to data of the correct type. C++ has stronger type checking than C, though not as strong as that provided by Pascal, which always prohibits attempts to use data of the wrong type. The C++ compiler produces errors in some cases, but in others, it converts data to the correct type.

In addition to having the C++ compiler perform these automatic conversions, you can explicitly convert between types using type casts.

A related area involves overloaded function names. In C++, you can give any number of functions the same name. The compiler decides which function should be called by checking the types of the parameters to the function call. If the correct function is not clear at compile time, the compiler issues an "ambiguity" error.