Hey Guys, im a fairly novice programmer
I would just like to hear some views / opinions on how you would go about implementing the following:
I need my program to save data to a textfile giving the file a name and adding a number to the end eg filename_1.txt. So, each time my program runs it saves the data entered to a new textfile (incrementing the number each time)
The way I was thinking of implementing this was to :
1. Create a textfile named count.txt that just contains a number (the number of files created)
2. Each time a new file needs to be created, check the count.txt file to see what the number is, then increment it by one and append it to the new textfile name, then overwrite the number that was in count.txt
3. close the program when data has been entered (creating unique filename)
I have come up with this approach beacuse I need the program to be able to keep track of the number as the user will close the application and only load it when needed.
To me it seems to be a sensible approach, but there are more than likely more efficient ways of doing this. Your comments would be much appreciated
Kind Regards
Michelle