What does `= 0` mean in decarting a pure virtual function?

Possible duplicates:
Virtual / Pure C ++ virtual belt
What is the difference between instances of virtual functions in C ++
Why is a pure virtual function initialized to 0?

This is the method in the declaration of some class that someone gave me. And I do not know what ".. = 0" means. What is it?

virtual void Print() const = 0;
+3
source share
3 answers

= 0makes the function pure virtual by providing the class an abstract class .

, , . , -, - ++. , . , .

, . , . , ++ - .

+8

, , , : , = 0. , . , , .

+4

, , . , . , .

+1

Source: https://habr.com/ru/post/1763312/


All Articles