[Solved] error: ‘Board::Board’ names the constructor, not the type Board::Board; C++ [closed]


In C++, methods and functions have the following syntax:

<return-type> <class-name> :: <method-name> ( <arguments> ) { <statements> }

Constructors don’t have a return type.

Other than that, how does your function definition match the syntax or does it?

Hint:

Board::Board()
{
}

Note: C++ is picky about its symbol characters. The ( is different than {.

1

solved error: ‘Board::Board’ names the constructor, not the type Board::Board; C++ [closed]