Why do we use virtual functions?

Answer Posted / td

A pure virtual member function is a member function that the
base class forces derived classes to
provide. Normally these member functions have no
implementation. Pure virtual functions are
equated to zero.
class Shape { public: virtual void draw() = 0; };

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you define a class in oop?

620


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1409


Can you name some types of inheritance?

635


What is interface? When and where is it used?

1657


What is polymorphism what are the different types of polymorphism?

553






write string class as your own class in java without using any built-in function

1968


What does and I oop mean?

610


What is the use of oops?

614


What are classes oop?

593


Why is static class not inherited?

590


What is overloading in oops?

591


What is the problem with multiple inheritance?

578


Why is abstraction used?

599


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

2319


What is overloading and its types?

608