Apr-28-2020, 06:52 PM
Does your program have information for all the contacts or only one?
Help with homework
|
Apr-28-2020, 06:52 PM
Does your program have information for all the contacts or only one?
Apr-28-2020, 07:09 PM
Apr-28-2020, 07:30 PM
(This post was last modified: Apr-28-2020, 07:30 PM by deanhystad.)
So there is not a page where you can see the entire contacts database? Too bad, because it would be really easy to write a new contacts database file from scratch if we had all the contacts.
I'll assume that each entry in the contacts database can be a different size, and the size of the updated entry may not match the size of the old entry. That would eliminate doing something surgical like using lseek to go to a particular location in the file and overwriting some bytes. That leaves the brute force methods: read entire file into memory, modify and write, or make a copy of the file and use that to build a new file. Your choice. What sounds better to you? I missed your update to an earlier post. Is your contacts file a database file? I missed that when I peeked at your code. That does provide additional options. |
|