string foo() const = 0;
What exactly does this function declaration mean? In particular, what is the '=0' good for, since the function is not declared to be virtual?
string foo() const = 0;
What exactly does this function declaration mean? In particular, what is the '=0' good for, since the function is not declared to be virtual?
The =0 is the syntax that the function is a pure virtual function. As far as i know that declaration also needs to be preceeded by the keyword virtual.
More reading about this here: What does it mean to set the declaration of a function equal to 0? How can you assign an integer to a function?
Difference between a virtual function and a pure virtual function