I'm trying to build a chess board of chess pieces. I got this
class ChessPiece
{
public:
ChessPiece();
virtual ~ChessPiece();
virtual bool movePiece() = 0;
};
and this class
class Pawn: public ChessPiece
{
public:
Pawn();
virtual ~Pawn();
bool movePiece();
};
in my main i'm trying to create a 2-dimension array of ChessPiece, but because it's abstract it's giving me problems.
I tried this
ChessPiece** board = new ChessPiece[8][8];
or
ChessPiece*** board = new ChessPiece*[8];
but it don't seem to work.. any help will be greatly appreciated Thank You!
ChessPiece*** board = new ChessPiece*[8];
Hooray, you're a 3star programmer now. Congrats! – πάντα ῥεῖ Dec 27 '14 at 17:41