Hello everyone!
I'm trying to understand the following code:
class char_queue
{
protected:
struct charNode
{
public:
char val;
charNode* next;
charNode(char ch, charList* ptr)
{
val = ch; next = ptr;
}
};
protected:
charNode* begin;
charNode* end;
void clearCharNode();
public:
char_queue();
bool find(char ch);
virtual void add(char ch);
virtual void clear()=0;
virtual void print();
}
Can you explain what does this expression: "virtual void clear()=0;" mean? I know what is "virtual" for? buf void clear()= 0 is very strange for me. 0 must be a returned of function clear()???