Runtime vs. compile time

In C is alleen compile-time type checking mogelijk, in C++ wordt met polymorfisme (virtual functions) ook runtime type checking mogelijk.

Maar wat zegt dit nou eigenlijk ?

Uit Wikipedia "C (programming language)":


C allows the use of pointers, a very simple type of reference that records, in effect, the address or location of an object or function in memory. Pointers can be dereferenced to access the data stored at the address pointed to, or to invoke the pointed-to function. Pointers can be manipulated using normal assignments and also pointer arithmetic. The run-time representation of a pointer value is typically a raw memory address, but since a pointer's type includes the type of the thing pointed to, expressions including pointers can be type-checked at compile time.

Zie ook: "Kernighan & Ritchie"