JerryAttrick
Technical User
In a small project I’d like to save user settings for the next run. I perceive that: -
1. On exit I need to generate an *.ini file storing the settings.
2. On subsequent runs I read back those settings on entry.
· On the first run, how do I avoid an (imagined) error situation when I try to read a non-existent file?
· On entry to my code can I check whether the *.ini file already exists - if yes then how?
· Do I need to read the file and then delete it every time (each time recreating and replacing it on exit)?
· Can I merely create a new *.ini file each time and write over the top of the old? Won’t that cause errors/problems?
1. On exit I need to generate an *.ini file storing the settings.
2. On subsequent runs I read back those settings on entry.
· On the first run, how do I avoid an (imagined) error situation when I try to read a non-existent file?
· On entry to my code can I check whether the *.ini file already exists - if yes then how?
· Do I need to read the file and then delete it every time (each time recreating and replacing it on exit)?
· Can I merely create a new *.ini file each time and write over the top of the old? Won’t that cause errors/problems?