C++ Programmer Question:

Tell me how to create a pure virtual function?

Tweet Share WhatsApp

Answer:

A function is made as pure virtual function by the using a specific signature, " = 0" appended to the function declaration as given below,
class SymmetricShape {
public:
// draw() is a pure virtual function.
virtual void draw() = 0;
};

Download C++ Programmer PDF Read All 59 C++ Programmer Questions
Previous QuestionNext Question
Explain void free (void* ptr)?Tell me what will the line of code below print out and why?