+ 2

Whats the difference between virtual and pure virtual function?

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

23rd Nov 2016, 9:39 AM
sadiya zainab
sadiya zainab - avatar
2 Réponses
+ 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
23rd Nov 2016, 10:19 AM
Burey
Burey - avatar