Undefined reference to 'Class::Class'

You have declared the default constructor (CombatAdmin()) and thus prevented the compiler from automatically generating it. Thus, you either need to 1) remove declaration of the default constructor from the class, or 2) provide an implementation.


I had this kind of error and the cause was that the CombatAdmin.cpp file wasn't selected as a Build target file: Prject->Properties->Build targets


Are you sure you've to include your header as:

#include <CombatAdmin.h>

?

I think you need to include your header file as:

#include "CombatAdmin.h"

And same for other headers written by you, like these:

#include "Armour.h"
#include "Player.h"
#include "Weapon.h"
//and similarly other header files written by you!

See this topic:

What is the difference between #include <filename> and #include "filename"?