Advertisement
dllbridge

Untitled

Nov 11th, 2021
875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include   <vector>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5.  
  6.  
  7.  
  8.  
  9. ////////////////////////////////////////////////////////////////
  10. int main()                                                    //  
  11. {
  12.    
  13.     vector <int> v;
  14.    
  15.    
  16.     cout << "v.size() = " << v.size() << "\n"; 
  17.    
  18.     for(int i = 1; i < 10; i++)
  19.     {
  20.         v.push_back(i);
  21.     }
  22.    
  23.     cout << "v.size() = " << v.size() << "\n";
  24.  
  25.     for(int i = 0; i < 8; i++) cout << v[i] << "\n";
  26.    
  27. }
  28.  
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement