Thread: Cross-referencing two lists?

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    3

    Cross-referencing two lists?

    Well I am working on a project and need a little push in the right way. The second link is the file and the part that I am stuck on is in red. Any comments are welcome as long as they are constructive in some way.

    list of files in the program
    --------------------------------
    http://www.angelfire.com/de3/code0/index.html

    part I need help on
    ------------------------
    http://www.angelfire.com/de3/code0/SlistDrCPP.html
    Last edited by stbede77; 02-02-2005 at 12:22 AM.

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    Re-name your pages with .html so we can actully see what you want us to see
    Woop?

  3. #3
    Registered User
    Join Date
    Feb 2005
    Posts
    3
    Sorry about that! Everything is fixed
    Last edited by stbede77; 02-02-2005 at 12:23 AM.

  4. #4
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    What is the program suppose to do? What are you having trouble with? What results are you getting? What results are you expecting?

  5. #5
    essence of digital xddxogm3's Avatar
    Join Date
    Sep 2003
    Posts
    589
    you have to traverse your list and test values, then print the apropriate nodes
    unless you instansiate an additional list storing students with abscenses, then you could just do a straight print of that list only.
    "Hence to fight and conquer in all your battles is not supreme excellence;
    supreme excellence consists in breaking the enemy's resistance without fighting."
    Art of War Sun Tzu

  6. #6
    Registered User
    Join Date
    Feb 2005
    Posts
    3
    Once the program is done, you should be able to enter people’s names and e-mail address that are in the class. From there you will enter the names of people that are present. From these two actions I need to find those who are absent. As of right now I have nothing, I have highlighted the part that I need help on in red.



    xviddivxoggmp3,
    Sounds good but I don't think that will work with the code I am trying to config. Thanks though!
    Last edited by stbede77; 02-02-2005 at 01:53 AM.

  7. #7
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Looks like you need to traverse your enrolled list and for each element in that list, you then need to attempt to retrieve it from the present list. If you don't find a match, then you can do an insert into your absent list.

    If you were using a sorted STL container I would have just said to use the set_difference function.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Minimax, URGENT :(
    By Dark-MX0Z in forum C++ Programming
    Replies: 6
    Last Post: 11-14-2007, 06:29 AM
  2. Question about Linked lists of lists
    By hear_no_evil in forum C Programming
    Replies: 2
    Last Post: 11-08-2004, 02:49 AM
  3. Linked Lists 101
    By The Brain in forum C++ Programming
    Replies: 5
    Last Post: 07-24-2004, 04:32 PM
  4. Map file formats and linked lists
    By Spitball in forum Game Programming
    Replies: 2
    Last Post: 03-04-2004, 11:32 PM
  5. need help w/ linked lists
    By MKashlev in forum C++ Programming
    Replies: 11
    Last Post: 08-05-2002, 08:57 PM