I'm getting the above error in C++ when trying to initialise an object of type Board. The constructor for board takes in two integers, so it's
Board::Board(int w, int h)
And I'm trying to create a Connect Four game. The ConnectFour.h file has the following:
Board b;
in its private variables, and the constructor in ConnectFour.cpp is this:
ConnectFour::ConnectFour()
{
Board b(7, 6);
among other things, obviously.
It's giving me the error:
In constructor ‘ConnectFour::ConnectFour(int, int)’:|
error: no matching function for call to ‘Board::Board()’|
note: candidates are:|
note: Board::Board(int, int)|
note: candidate expects 2 arguments, 0 provided|
If anyone could lend a hand, I'd really appreciate it.
Edit: Turns out I was being a bit silly. Thanks guys.