The problem as follow: Create Inventory structure contain members: 1.item description 2.quantity 3.date added item Then store the structure into a .txt file. (i name it as "Inventory.txt") Display a menu to let user choose an option: 1. Insert new record 2. Display any record in the txt file 3. Edit/update any record in the txt file How to access to a particular record in the txt file i created ??? i've tried my best to look for solution in the reference books yet couldn't get an answer. Anyone here could suggest an algorithm to perform that task ? My Inventory.txt: (i use "_" to replace " ") Description___________________quantity________date added Colour pencil_________________6_______________03/03/2008 Eraser________________________20______________02/03/2008
There's not much you need by way of an algorithm, pretty much just open the file, loop through it until you find the record you want then do whatever you want with that record. How far have you got with the program and where are you stuck?