[Solved] C++ cannot instantiate abstract class


getPosition is non-const in the interface class, but const in your derived class. These are two different functions and cause your problem.

Adding the override keyword in the implementation class (if your compiler supports it) will flag this sort of problem.

0

solved C++ cannot instantiate abstract class