#include <iostream>
#include <list>
#include <algorithm>
usingnamespace std;
//Assuming there is a class named Something which was already declared
int main(){
list<Something> List;
list<Something>:: iterator iter;
iter=find(List.begin(), List.end(), SomeVale);
//....
}
?? it works with regular pointer and iterator if a-kind-of-a-pointer
You are wrong. It does not work with regular pointers. It works only if a function is designed such a way that it returns null pointer in case it did not find the target element.