I have AbstractClass
and virtual int getInfo() = 0;
plus static int info;
And I have class ConcreteClass
with
int ConcreteClass::getInfo()
{
return info;
}
But I get errors
Undefined reference to 'AbstractClass::getInfo'
and
collect2:error:ld returned 1 exit status
Please tell me what the problem with this is.
Update: Should I define my int info
in the AbstractClass
constructor?