Thread: Address Book

  1. #1
    Registered User
    Join Date
    Aug 2002
    Posts
    109

    Address Book

    I'm trying to make an address book but I have come across a simple problem. All the data (eg. name address etc) is saved into a text file but when I come to relocate it in the txt file how would I do this

  2. #2
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    1. Google is your friend.
    2. Search feature.
    3. RTFM.
    The world is waiting. I must leave you now.

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>>but when I come to relocate it in the txt file how would I do this
    What exactly do you mean? A simple address book will store it's data in memory in some sort of list, then write the list to disk when a save is needed. From there, it can be read back in again.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    109
    Here is an example of what i want to do:

    The user wants to add a new contact to his address book. So he first enter the contacts name which will be saved to a text file then enter the contacts address and that gets added to the txt file, and so on and so forth until he finshed entering all the data needed. Once he has done this and whats to view the contacts infomation he will look up the contact and then the computer will read the infomation out of the text file and print it onto the screen.

    I hope this helps please tell me if it doesn't

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    OK, so you have a good idea of what you want your application to do. Next start breaking it down into sections and go from there.

    Think about how you're going to store the data in memory (list/tree/array etc), how you're going to get the data from the user, any validation needed etc

    Once you have it broken down into sections, trying coding some snippets to get you started.

    There is plenty of source code on these boards for doing this type of thing, including a competition entry I wrote a while back. Best of using your own code though
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I am very new . . . :(
    By Eternalglory47 in forum C++ Programming
    Replies: 6
    Last Post: 09-05-2008, 11:29 AM
  2. Replies: 10
    Last Post: 09-04-2008, 01:27 PM
  3. simple structure/linked list question
    By niponki in forum C Programming
    Replies: 16
    Last Post: 08-14-2005, 11:13 PM
  4. Memory leak - need help finding
    By ChadJohnson in forum C++ Programming
    Replies: 8
    Last Post: 04-06-2005, 07:26 PM
  5. Books on C and C++
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-28-2002, 04:18 PM