struct device{
virtual void switchon()=0{}
};
int main()
{
}
I wrote code similar to following and it gave error.
pure-specifier on function-definition compilation terminated due to -Wfatal-errors.
When I asked him, he showed me the following quote from the Standard
A virtual function declared in a class shall be defined, or declared pure (10.4) in that class, or both; but no diagnostic is required (3.2).
I can't seem to understand what it means and I think this somehow is not relevant. Any help in this is appreciated.
PS: If this is not the relevant quote, pls guide me to the proper one so that I can have a better counterargument.