I defined the following function to find out the iterator of a certain value in the vector. I defined it as such so if the value exist in the vector then return a iterator of it, if not then return a pointer pointing to nonsense.:
I'd say the proper behavior is to return an iterator pointing to end() (1 past the end of the container, and thus it is invalid in all cases); this is what all standard find functions do, and what it looks like you are trying to to with your function.