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 |
Perform addition, multiplication, subtraction of 2-D array using Operator Overloading.
What are default parameters? How are they evaluated in c++ function?
Are vectors faster than arrays?
Difference between linked list and array?
Explain some examples of operator overloading?
What is the difference between function overloading and operator overloading?
Difference between static global and global?
16 Answers Microsoft, Symphony, Wipro,
How to give an alternate name to a namespace?
What is the basic of c++?
Do you know the problem with overriding functions?
What is the difference between stack and heap memory?
write a function signature with various number of parameters.