Guest User

Untitled

a guest
Jun 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. vector<Type>::iterator nth = v.begin() + index;
  2.  
  3. std::vector<>::iterator it = ( v.begin() + index );
  4.  
  5. std::vector<>::iterator it = v.begin();
  6. std::advance( it, index );
  7.  
  8. vector<int>::iterator i = L.begin();
  9. advance(i, 2);
  10.  
  11. int main()
  12. {
  13.  
  14. void foo(const char *);
  15.  
  16. sdt::vector<char> vec;
  17. vec.push_back('h');
  18. vec.push_back('e');
  19. vec.push_back('l');
  20. vec.push_back('l');
  21. vec.push_back('o');
  22. vec.push_back('/0');
  23.  
  24. foo(&vec[0]);
  25. }
  26.  
  27. vector.insert(pos, &vec[first_index], &vec[last_index]);
Add Comment
Please, Sign In to add comment