Write a program that uses a structure to store the following information in a file:
Quantity On Hand
Date added to to inventory
Then the program should have a menu that allows the user to perform these tasks:
Add new records to the file
Display any record in the file
Change any record in the file
My confusion is with the file itself. Just what exactly are you supposed to write in the file? Can you create this file while coding the program? Or do you have to have some preset information inside it? For example: If I wanted to access a file named inventory.dat, would I need to have information inside it, or can this file be created while the program is getting coded?
So now in relation to the program that I need to write, Do I put the item descriptions that I mentioned above inside the file before writing the program? Or can they just be put inside the code and then the file can be modified by the user and then saved to this file? Very confused about files here....