J
J
Junior0072016-10-12 18:43:34
C++ / C#
Junior007, 2016-10-12 18:43:34

What are virtual methods for?

What are virtual methods for?
I know that:
1) a pure virtual method makes a class abstract
2) A regular virtual function is needed to correctly call overloaded functions in derived classes
But what is a virtual destructor for, for example?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel K, 2016-10-12
@Junior007

It is not just needed, it is required if there is at least one virtual function.
Read more: https://habrahabr.ru/post/64280/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question