#include <iostream> 
#include <vector> 
using namespace std; 
 
int main() { 
  vector<double> vec; 
  vec = { 1.1, 2.2, 3.3 }; 
  cout << "Size: " << vec.size() << endl;  
 
  vec.push_back(4.4);  vec.push_back(5.5);   
  cout << "Size: " << vec.size() << endl;  
 
  cout << "vec.at(2): " << vec.at(2) << endl; 
  cout << "vec[2]   : " << vec[2]    << endl; 
 
  for (vector<double>::iterator  
         it = vec.begin(); it!=vec.end(); ++it) { 
    cout << *it << ", "; } 
 
  for (auto it = vec.begin(); it!=vec.end(); ++it) { 
    cout << *it << ", "; } 
 
  for (auto val : vec){  
    cout << val << ", "; } 
 
  return 0; } 
