I am trying to make a Chess Game in C++ using OOPS concepts but face the following error:
src/Game.cpp:6:36: error: no matching function for call to ‘Player::Player()’
Game::Game(): player1(1), player2(0){
^
In file included from include/Game.h:4:0,
from src/Game.cpp:2:
Run Code Online (Sandbox Code Playgroud)
Here is my code:
Player.h
#ifndef PLAYER_H
#define PLAYER_H
#include <string>
#include <King.h>
#include <Knight.h>
#include <Pawn.h>
#include <Queen.h>
#include <Bishop.h>
#include <Rook.h>
using namespace std;
class Player{
public:
Player(int color);
void getMove();
int playerColor; // 0 if player is black, 1 …Run Code Online (Sandbox Code Playgroud)