Need help finding post.

This is a discussion on Need help finding post. within the C++ Programming forums, part of the General Programming Boards category; You’re working for a company that wants to take client contact information as it is entered by a salesperson from ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    22

    Need help finding post.

    You’re working for a company that wants to take client contact information as it is entered by a salesperson from a stack of business cards that he or she has collected, and output the information to a file (contacts.dat) in alphabetical order. Assume that there are never more than 100 cards to enter. The program should prompt the salesperson for each of the following values for each card:
    Last Name
    First Name
    Middle Name or Initial
    Title
    Company Name
    Street Address
    City
    State
    Zip Code
    Phone number
    Fax number
    Email address

    After the data are entered for each card, the user should be asked if there is another card to enter. This data should be sorted by Last Name, using a version of the SortedList class that will hold up to 100 struct values, each with a member corresponding to an item in the list above. Because the struct is so large, however, it will be more efficient if each element of the list array is a pointer to one of the struct values, and the class merely rearranges the pointers within the array in order to do the sorting. You should dynamically create a new struct value each componet of the list array to point to as the cards are input. The print function of the class will need to be modified to output the list to the contacts.dat file instead of cout. Each member of the struct should be written on a separate line. The function should also write the number of cards that are in the list as the first line of the file.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,334
    OK, so what is your question?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Dec 2006
    Posts
    22
    I am trying to find previous post concerning the same problem.

    Quote Originally Posted by Salem
    OK, so what is your question?

  4. #4
    MFC killed my cat! manutd's Avatar
    Join Date
    Sep 2006
    Location
    Boston, Massachusetts
    Posts
    870
    Click search.
    Silence is better than unmeaning words.
    - Pythagoras
    My blog

  5. #5
    Registered User
    Join Date
    Dec 2006
    Posts
    22
    Okay. I clicked search but did not find the post. So I am pasting my code and the errors for beginners.

    Quote Originally Posted by manutd
    Click search.

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,334
    A better attempt here
    Need help with program.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Post your Best Text Adventure
    By Joe100 in forum Game Programming
    Replies: 3
    Last Post: 08-15-2003, 05:47 PM
  2. Auto POST
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 06-07-2003, 10:42 AM
  3. post update
    By iain in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-12-2001, 10:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21