I'm writing code for a game of tic tac toe which includes a player abstract class. the abstract class extends to a HumanPlayer class and a ComputerPlayer interface which itself extends a RandomPlayer subclass. In the program there is a Game class header as follows
#ifndef GAME_HPP_
#define GAME_HPP_
#include "HumanPlayer.cpp"
#include "RandomPlayer.cpp"
class Game{
/*functions and variables go here*/
};
#endif /* GAME_HPP_ */
Both HumanPlayer and RandomPlayer eventually include Player.hpp and Player.hpp includes the Board class Board.cpp. Essentially whenever this is compiled, Player.hpp is included twice and so Board.cpp is included twice. Every header file is contained in include guards yet in Board.cpp and Game.cpp I'm still getting "first defined here" errors on every member function. How do I get rid of those errors?