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 << b.pieces[row][col].pType;
}
}
return ofs;
};
I get an error trying to use it...
void GameBoard::PrintGametoFile()
{
ofstream outFile;
outFile << *this;
}
error - error C2593: 'operator <<' is ambiguous