I'm a little confused about the terms "static type" and "dynamic type".
Given
class A {};
class B:A {};
A* a = new B();
B* b = new B();
The static type of *a is B and the dynamic type is A. The static type of *b is B and the dynamic type is B.
Is that correct?
This is not a question about dynamic type checking but rather the terms "static type" and "dynamic type". In this article http://makomdev.blogspot.com/2008/04/c-static-types-vs-dynamic-types.html the author defines static type as the "real" type and dynamic type as the base type. He also defines them in terms of rhs and lhs which seems contradictory.