Guest User

Untitled

a guest
Nov 23rd, 2015
802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. void pushback(std::vector<int> &vec, int item)
  2. {
  3.     if(std::find(vec.cbegin(), vec.cend(), item) == vec.cend())
  4.         vec.push_back(item);
  5. }
Advertisement
Add Comment
Please, Sign In to add comment