What does declaration mean?

i have seen declaration:
1
2
3
4
5
6
class EventHandler
{
	EventHandler();
	~EventHandler();
	vituarl void HandleEvent (EventType e, void* sender) = 0; // i don't understand
}

Please explains for me declaration "vituarl void HandleEvent(...) = 0". Why is "= 0", and when do use that declaration? Thank so much.
Last edited on
It's a pure virtual function. It means:
1. You cannot create an instance of this class, it serves as a base class.
2. Any instantiated derived class must implement that function, void HandleEvent(EventType, void*).
thank so much
I have read "Abstract classes and pure virtual functions" section in wiki, and that has said: "Although pure virtual methods typically have no implementation in the class that declares them, pure virtual methods in C++ are permitted to contain an implementation in their declaring class, <b>providing fallback or default behaviour that a derived class can delegate to, if appropriate.</b>" I understand declaration is used to create abstract class, but i don't understand "providing fallback or default behaviour that a derived class can delegate to, if appropriate." Please explains for me, thank so much.
Topic archived. No new replies allowed.