okay, Ill explain as best I can what I am doing. I am making a text game engine with an editor. I have been coded for several hours now, and have come at a fork in the road. I know one way to save to a file via <fstream> is there a more easily used way. Since it has an editor I am going to have to be able to easily add data to these files. Yet the idea I am using now looks likes this...
Character Save File--
Code for readingCode:0000 0000 000 000 00 00 00 00 00 00 00000 00000 1 NAME 0000 0000 000 000 00 00 00 00 00 00 00000 00000 1 NAME 0000 0000 000 000 00 00 00 00 00 00 00000 00000 1 NAME and so on and so forth up to 99
This WORKS fine, but I cant seem to edit individual values in the save file. Modifying them is easy it is just saving them back to the file I cant figure out. So I figure I need to use a different approac. Thank you SO much for any help.Code:for ( int x = 1; x != c; ++x ) { b_file >> preset.HPC[x] >> preset.HPB[x] >> preset.MPC[x] >> preset.MPB[x] >> preset.STC[x] >> preset.STB[x] >> preset.SPC[x] >> preset.SPB[x] >> preset.DFC[x] >> preset.DFB[x] >>preset.EXP[x] >> preset.MON[x] >> preset.IID[x]>>preset.names[x]; }