Members - Reputation: 256
Posted 10 July 2012 - 07:44 PM
Crossbones+ - Reputation: 6122
Posted 10 July 2012 - 08:00 PM
I know I can use FILE *save; and then take it from there, but is this the most effective way to make a game save in the C programming language? If the game is installed in Windows' "Program Files" directory, it will not alert the user that an administrative password is needed in order to change the contents of that folder? Would Windows somehow automatically redirect these actions to the "Documents and Settings" directory for both reading and writing a file?
You can and should use the OS API to get the appropiate location for user / application data. (on *nix you can just write to ~/.appname/yourfileshere but for Windows you need to use the OS API to get the appropriate location as it varies depending on what version of the OS the user has (and for atleast some versions it also varies between languages). (The same goes for your installer, never assume that applications are or should be installed in C:\Program Files, non english versions of windows tend to have other names for that folder)
The voices in my head may not be real, but they have some good ideas!