If I have a class with one pure virtual function, must all the functions be pure virtual as well?
#pragma once
class Shape {
private:
static int countShape;
public:
virtual float perimeter() const=0;
virtual float area() const=0;
virtual void print();
virtual void input();
void setCountShape();
int getCountShape()const{return countShape;};
Shape(void);
~Shape(void);
};
I tried to run my program and it writes the messege:
Error 3 error LNK2001: unresolved external symbol "public: virtual void __thiscall Shape::input(void)" (?input@Shape@@UAEXXZ)
Error 1 error LNK2001: unresolved external symbol "public: virtual void __thiscall Shape::print(void)" (?print@Shape@@UAEXXZ)