This question is really interesting one.
My question is related to "STL Find Algorithm"
Defination Direct from book
The find algorithm is an operation (function) that can be applied to many STL containers. It searches a subrange of the elements in a container (or all the elements), looking for an element that is "equal to" a specified value; the equality operator (==) must be defined for the type of the container's elements"Now my questions are
1) How can I use "the equality operator (==)" in my class as defined above. PLease visualize with an example
2) Also my requirement is to only compare the pointers rather than subrange of the elements in a container (or all the elements). Is there anything else other than "find algorithm" defined in STL which I can use to compare pointers?
OR will I need to define my own function which behaves much like "find" but with only difference that "my function will only compare pointers in its logic"
Please help me it is urgent
Any suggestions will be highly appreciated