- get bitten by a radioactive spider
- travel to a distant planet where the cosmic rays enable a super power.
- hmm... Not being a comic book fan, those are the only two I can think of.
void loadGame(){ //load a game
string filename;
cout << " Enter filename ==> ";
cin >> filename;
ifstream myfile (filename.c_str());//check the file is open or not
if (myfile.good())
{
x = 1;
while (x <= 8){
y = 1;
while (y <= 8)
{
myfile.get(board[x][y]);
y = y + 1;
}
x= x + 1;
}
myfile >> PLAYER[i];
Board();
}else { //if can not find the file that you want to open
cout << "Error reading the file, please try again." << endl;
return;
}
my player is an array which store X or O so how to save or load it,anyoe can help?