What is a 'pure' virtual function and what's its use?
Answer / phool chand
A pure virtual function is signified by using `=0;' in place of the body of the function. The presence of a pure virtual function prevents instantiation of the class which contains it. For this to be of any use, a derived class must implement the pure virtual function. I.e. the derived class must provide a function with the same name which includes a function body.
The basic reason for pure virtual functions is to specify something that a class can do without specifying how the class will do it.
Is This Answer Correct ? | 0 Yes | 0 No |
How to declaring variables in c++?
Can you explain the term "resource acquisition is initialization?"
What is object in c++ example?
A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
How can you link a c++ program to c functions?
Why is c++ is better than c?
Why seem interrupt handlers as member functions to be impossible?
Why are pointers used?
Can I run c program in turbo c++?
How the keyword struct is different from the keyword class in c++?
What is null pointer and void pointer?
what are the types of Member Functions?