Lets say classes b and c are derived from class a.
Can you:
1. make a pointer of a type (a * pointer) and point that pointer at a b type object?
2 if you can, can you point that pointer pointing at b at an object of type c?
Thanks :)
class A {};
class B: public A {};
class C: public A {};
int main()
{
B b;
C c;
A* pA = &b; // Make it point at an object of type 'B'
pA = &c; // Change it to point to an object of type 'C'
}