myfile <<"Name:"<< PlayerName;
myfile <<"Gender:"<< PlayerGender;
This code will create a file that looks like this
Name:GeorgeGender:10
When you save to the file, just insert a blank space or return character after the value, like this
myfile <<"Name:"<< PlayerName << std::endl;
myfile <<"Gender:"<< PlayerGender << std::endl;
Now the saved file will look like this
Name:George
Gender:10
To load data, just get the string from the ":" character to the end using
substr