merging two linked lists..

This is a discussion on merging two linked lists.. within the C++ Programming forums, part of the General Programming Boards category; what the basic structure of mergin two linked lists when overloading the += operator? thx Maki...

  1. #1
    Makimura
    Guest

    merging two linked lists..

    what the basic structure of mergin two linked lists when overloading the += operator?

    thx

    Maki

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    Just link the last item in one list to the first in the other list.
    // Gliptic

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    3
    http://www.geocities.com/speedway01/list.txt

    I made an example and it seems to work ok.I copied the second list instead of just adding a pointer to it incase it goes out of scope.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. merging linked lists
    By scwizzo in forum C++ Programming
    Replies: 15
    Last Post: 09-14-2008, 06:07 PM
  2. Linked Lists 101
    By The Brain in forum C++ Programming
    Replies: 5
    Last Post: 07-24-2004, 05:32 PM
  3. need help w/ linked lists
    By MKashlev in forum C++ Programming
    Replies: 11
    Last Post: 08-05-2002, 09:57 PM
  4. doubly linked lists
    By qwertiop in forum C++ Programming
    Replies: 3
    Last Post: 10-03-2001, 07:25 PM
  5. Merging Linked Lists
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 09-23-2001, 08:08 PM

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