   List class and .find() !? Help!
  Argg so im trying to use the list class because I was told it had this great function called "find()". Well everytime I try and compile I get the following error " : error C2039: 'find' : is not a member of 'std::list<_Ty>'"and sure enough when I start typing my list, and the little dropdown shows up, I see EVERY other function but this one. All the other functions work great, push pop ect... the list class seems to work fine in every other regard. Im using VS 2003.Please help before my brain explodes!Btw, assuming I can get 'find' working, my next challenge is to figure out how to compare two lists, and tell how they are different. Are there any functions built into the class that could do this?Thanks in advance!   
  You're probably looking for this. It's not a std::list<> member function, but rather a global function that operates on multiple container types.   ;  Something like #include <algo> or #include <algorithm> iirc.   ;  Wohoo thanks was banging my head trying to figure out what was wrong, you do infact need <algorithm> in order to use find. Looks like its workign now.So, now for the next question. What would be the best way to look at two lists, and make a third list of any item that shows up in one list, but not in the other. A sort of 'compare' lists function. Is there anythign build in that will do this? Or am I gonna have to write somethign custom   ;Quote:Original post by ZealousEngineSo, now for the next question. What would be the best way to look at two lists, and make a third list of any item that shows up in one list, but not in the other. A sort of 'compare' lists function. Is there anythign build in that will do this? Or am I gonna have to write somethign customPerhaps set_difference()?   ;  - Consider that std::list might not be the best container for the job. What is your typical usage pattern for the containers? What kinds of tasks are you primarily trying to solve by keeping things in a container?- Are the lists sorted? You'll need them to be sorted first in order to use set_difference(). However, consider also if set_symmetric_difference() more accurately describes what you want to do. Also consider if there are any further restrictions (preconditions) that may simplify the task. For example, if the lists are the same length, and you just want to check pairs of elements in the same positions to see if they match, that's a rather different task.   