This accepted answer states the following code:
std::find(vector.begin(), vector.end(), item)!=vector.end()
The first part I understand, we are going to find item between the begin and end of vector. But why the !=vector.end()
. Something like: "if the end of the vector does not equal what is found"? Should this code be in an if
statement?