Usually we use base class pointer and points to some derived object and use virtual mechanism.
base* b = new derived;
here virtual function defined in derived class will be executed.
derived* d = new derived;
base& b= *d;
in this case also derived class function will be called.
why we are not using references in virtual mechanism...