A pointer bears no resemblance to what sort of object its pointing to. This is why there is a void* type in C/C++. This void* simply declares a pointer to anything.
class Foo{public: int a;};class Bar : public Foo{public: int b;};int main (){ printf ("%d, %d, %d\n", sizeof(void*) sizeof(Foo*), sizeof(Bar*)); return 0;}
Output (32-bit compiler):
4, 4, 4