Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. /*vector<int> a;
  10. //vector<int> first;
  11. //first.assign(6,10);
  12.  
  13. for(int i = 0; i <=5; i++)
  14. {
  15. a.push_back(i);
  16. }
  17. for(int i = 0; i <= a.size(); i++)
  18. {
  19. cout<< a.at(i) << endl;
  20. }
  21. */
  22. vector<int>s;
  23. s.push_back(11);
  24. s.push_back(22);
  25. s.push_back(33);
  26. s.push_back(55);
  27. for (auto& it : s) {
  28. cout << it << endl;
  29. }
  30.  
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement