1 Answer
1

In C++ only pure virtual functions are allowed to exist without a function definition.
In your code you do not have any pure virtual functions. Pure virtual functions are the one's which have an =0 in the declaration.
For example:

virtual void doSomething()=0;

The virtual member functions(function1() and function2()) in your base class Amust have a definition since they are not pure virtual. You did not provide their definitions and hence the linker appropriately complains about missing definition.