Whats the difference between virtual and pure virtual function? | Sololearn: Learn to code for FREE!

+2

Whats the difference between virtual and pure virtual function?

syntax: virtual functionname(); pure virtual virtual functionname()=0;

11/23/2016 9:39:15 AM

sadiya zainab

2 Answers

New Answer

+3

virtual function can have actual implemntation where it was declared pure virtual functions does not have and the responsibility to implement it goes to any class which inherit the class which declared it without implementing pure virtual function you will have compile error