daily pastebin goal
36%
SHARE
TWEET

Untitled

a guest Jun 25th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top