Hey guys, I'm doing a Text-based RPG game and it will include some checkpoints, on those checkpoints the game will save the progress, so I need to write all my variables to a text file and then read them all when the player loads the game.
Some of my variables, like enemyNames, dont have any determined size, they're like this: "int enemyNames[];"
So how do I write an array to a text file without determining a size?
And how do I read them when the player loads the game?
You need to give those arrays sizes. Just give them a size definitely larger than you are going to use. I also wonder, why are you giving your enemies integers for names?
it's just for the names and stuff like that, it's undertemined so i can add more names without having to change its size each time but, as i've seen here and in other forums, i need to definitely give them size...
as for the int for names, i was distracted, it's string ofc