C++ Virtual Functions Question: Download Questions PDF
Give example of a pure virtual function in C++?
![C++ Virtual Functions Interview Answer C++ Virtual Functions Interview Question](https://globalguideline.com/public/images/interview/31.png)
Answer:
class SomeClass {
public:
virtual void pure_virtual() = 0; // a pure virtual function
// note that there is no function body
};
public:
virtual void pure_virtual() = 0; // a pure virtual function
// note that there is no function body
};
Download C++ Virtual Functions Interview Questions And Answers
PDF
Previous Question | Next Question |
Can you please explain the difference between using macro and inline functions? | Tell me can a pure virtual function have an implementation? |