I have values changing at some rate per second that i am storing in a variable then i am printing these values in a file. So i have to append the values into the file so that they are not over written and all the values are displayed line by line. But when i close the program i need the file to be cleared. But only when i close the program and not when the function exits that it clears the file.
How to append data to file and clear it when it's closed
Collapse
X
Comment