Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<int>::iterator it;
- // /cut/ search for something in vector and point iterator at it.
- if(!it) //check whether found
- do_something();
- std::vector<int>::iterator i = std::find(v.begin(), v.end(), 13);
- if (i != v.end())
- {
- // ...
- }
- if(it != aVector.end()) //past-the-end iterator
- do_something();
Add Comment
Please, Sign In to add comment