Linked List Help

This is a discussion on Linked List Help within the C++ Programming forums, part of the General Programming Boards category; I've been trying to get down the concept of searching a linked list for given information. I'm looking to input ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    2

    Linked List Help

    I've been trying to get down the concept of searching a linked list for given information. I'm looking to input a last name and first name and it somehow search the current listed items for that information. If it is there, it prints out the information in the array (Name and Phone No). If it isn't, it just says it isn't. I just..can't seem to get this right. Any suggestions or help would be appreciated. And I know I'm probably way off on it. I mean, I can get it to search with a single array set, but not with how it is now. Linked lists just hate me.
    Attached Files Attached Files

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    Code:
     
    void search(TeleType *contents)
    {
              while (s1 != name)
              {
                        cout << s1;
              }
              cout << endl;
    
              return;
    }

    What is s1 here?
    What is name?
    How it is connected to contents?
    Where do you make list iteration?
    How many times you want to print a name?
    If you want to check 2 conditions - you do it as ( A && B )
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ Linked list program need help !!!
    By dcoll025 in forum C++ Programming
    Replies: 1
    Last Post: 04-20-2009, 10:03 AM
  2. Following CTools
    By EstateMatt in forum C Programming
    Replies: 5
    Last Post: 06-26-2008, 10:10 AM
  3. Reverse function for linked list
    By Brigs76 in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2006, 10:01 AM
  4. Template Class for Linked List
    By pecymanski in forum C++ Programming
    Replies: 2
    Last Post: 12-04-2001, 08:07 PM
  5. singly linked list
    By clarinetster in forum C Programming
    Replies: 2
    Last Post: 08-26-2001, 10:21 PM

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