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

What is polymorphism what is it for and how is it used?

576


What is class encapsulation?

594


How do you achieve polymorphism?

618


i got a backdoor offer in process global,Bangalore..Can i work with it?

2328


What is destructor in oop?

625






How Do you Code Composition and Aggregation in C++ ?

24201


Whats oop mean?

595


What are two types of polymorphism?

612


Write a program to sort the number with different sorts in one program ??

1921


Can a varargs method be overloaded?

617


What is super in oop?

599


What are constructors in oop?

595


What is the main feature of oop?

621


when to use 'mutable' keyword and when to use 'const cast' in c++

1644


What does enum stand for?

617