Ok, I am building a text based rpg. This an excerpt from my code. at one point it asks what your name is. When you type that in I put it into a string variable called name but I want to be able to save it to a binary file so it can be read later on if you shutdown the game than restart and you choose load game instead of new game.
I went through about 10 tutorials on this and none are working properly. And no i dont want to write to a txt file because people can edit the info to cheat once stats are put in there. So binary will be what I want.
int main()
{
string name;
cout << "Enter your name: ";
cin >> name;
}
so taking this string variable called name, I want to write the string to a binary file.
Any help is appreciated.