I have to resolve a problem where an address book is saved to disk and read back in.
I would appreciate some help with the logical flow.
This program allows user to add personal info and read it back in, and then add additional records.
-- There are 2 classes- one for Personal info, one for a List array.
-- A menu allows user to add / show all personal record info.
-- on Quit, program writes list array to disk.
-- on Launch, program reads it back in.
I tried different approaches with respect to reading the inFile into memory and adding new records. Dependend on what I do get different results - but - none lead to satisfaction.
For example, added record overwrites 1st record in memory, or non is added but the first record in the array is duplicated at the end of the list - with out having the New Record added in and so forth.
Do you have any structural suggestions for order as to when things need to happen? Or, do you have any code I can use /look at for this? I am sure it has been done many times but what I found on the web are only pieces for i/o streams but I could not get beyond that or utilize it correctly.
I truly would appreciate your help! Btw, in my class we didn't have pointers/vectors/templates/friends yet. Solutions need to be accomplished without those fancy approaches if possible.
Thanks so much!