In my program, I write a file of my program states. I write a file many times to a file during program startup, because the program changes some variables that I need to store very often.
Now, if for some reason my power fails. Then most of the time I lose data in this file.
Please tell me some mechanism that can protect the data, even if there is a power failure. (I wrote a program in C ++ on Windows).
thank
Tarun source
share