How to call a non virtual function in the derived class by
using base class pointer

Answer Posted / aaa

Typecast the base pointer to derived class pointer type and
then invoke the derived class's function.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we override main method?

595


What is constructor in oop?

576


Templates mean

1581


Can a destructor be called directly?

591


What is static in oop?

585






Why oops is important?

598


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1635


How is polymorphism achieved?

576


explain sub-type and sub class? atleast u have differ it into 4 points?

1826


What is the fundamental idea of oop?

624


Whats is abstraction in oops?

584


Whats oop mean?

582


What is an advantage of polymorphism?

584


Is this job good for future? can do this job post grduate student?

1683


What is polymorphism and why is it important?

550