No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
5 Posted Topics
I'm building a tic tac toe game with a variable board size using class GameBoard and class GamePiece. The GamePieces have a char array, pName, for the player's name and a char pType for the piece (X or O). the board is set up using a pointer to an array … | |
I have a pointer called **pieces that points to an array of class type GamePieces that contain members pName and pType. I am trying store values in pieces[row][col].pType and then print the pieces in a matrix. My program crashes on this line of code: [code] while (pieces[row][col].pType == 'X' || … | |
Can anyone lead me in the right direction to get this to work??? my << overload compiles fine... ofstream& operator<<(ofstream& ofs, const GameBoard& b) //overloaded ofstream operator to save board & piece { for (int row=0; row < b.size; row++) { for (int col; col < b.size; col++) { ofs … | |
I'm trying to compile the following class code and keep getting errors on the overload functions. Everything else compiles ok. I've looked at several sources and compared the syntax and I don't see where the problem is. Please help??? header file [code] #ifndef GAMEPIECE_H #define GAMEPIECE_H #include <iostream> #include <cctype> … | |
I'm trying to put together a tic tac toe game for a c++ class. Requirements are that it have two classes - gameboard and gamepiece. The gameboard I've pretty much taken care of, but I'm confused on how to set up the gamepiece class. Here's the requirements as given to … |
The End.