Can we have a private virtual method ?
Answer Posted / nk
We can have virtual functions as long as we dont call the
function from a base pointer pointing to the base
class/derived class.
If we call then gives error.
The same error can be tested by compiling and running above
example.
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is difference between inheritance and polymorphism?
What is pure oop?
What are functions in oop?
What is the point of polymorphism?
Why is oop useful?
#include
What polymorphism means?
write a program that takes input in digits and display the result in words from 1 to 1000
What is oops and why we use oops?
What is and I oop mean?
What are the 5 oop principles?
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)
Why is object oriented programming so hard?
What is encapsulation with real life example?
What is abstraction and encapsulation?