I'm trying to make a simple game in c++, I'm almost complete but I keep running into this error. I'm sure these are syntax errors, I'm just not sure on how to fix them.
Board::Board()
{
side = 6;
Piece[][] spaces = new Piece[6][6];
for (int row = 00; row < side; ++row)
{
for (int column = 0; column < side; ++column)
{
spaces[row][column] = new blankPiece;
}
}
}
Here is what eclipse is saying:
..\Board.cpp: In constructor 'Board::Board()':
..\Board.cpp:13:7: error: expected unqualified-id before '[' token
..\Board.cpp:18:30: error: no match for 'operator=' in '((Board*)this)->Board::spaces[row][column] = (operator new(8u), (<statement>, ((blankPiece*)<anonymous>)))'
..\/Piece.h:14:1: note: candidate is: Piece& Piece::operator=(const Piece&)