Results 1 to 2 of 2

Thread: lists

  1. #1

    Thread Starter
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024

    lists

    If I had 2 vars of STL list that both have ~50,000 records a piece. What would be the best way to find records that were in one list but not in the other. I dont see where it has a built in search function. I dont have to loop through each list do it? Is there a better way to do this?
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    i'm not really sure if this does what you need, since I've never used it yet.. but there's a function called set_difference in the STL (it requires that you include <algorithm>).

    You might want to try that.

    also unique is said to eleminate duplicate copies from a range, so that might be of use too?

    Good luck, and someone else prolly has a better view on this point.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width