Friday, 22 March 2019

What is pure virtual function? tccicomputercoaching.com

A virtual function whose declaration ends with = 0 is called a pure virtual function. For example,

class Weapon
{
public:
virtual void features() = 0;
};



A class containing pure virtual function is known as abstract class . This concept is applicable in Inheritance only.

Pure virtual function is declared in parent class and can't create object of parent class. Pure virtual function is redefined in child class.

To learn more about C++ .

Call us @ 9825618292

Visit us @ http://tccicomputercoaching.com/

No comments:

Post a Comment