I am trying to make a save state file and need to break it into words. I am unable to find any where that gives an explanation on how to do this, I am only able to break it into lines via the getline() command.
if (saveStateRead.is_open())
{
for (int i = 0; i < 14; i++)
{
while (getline(saveStateRead, saveState[i]))
{
cout << saveState[i];
}
}
saveStateRead.close();
}
This is the code I have that is writing it to my array. I would like it to break into individual digits by both space and just by the next digit. My save state file looks like this
00 00 00 00 00 00 00 00 00 00 00 00
if you have any suggestions they would be greatly appreciated.