Object-Oriented Programming in C++

Code display of PL3/vector3.cpp

// PL3/vector3.cpp
// Demonstration of the vector container and the use of iterators
// Niels Walet, last updated 04/12/2019
#include<iostream>
#include<vector>
int main() 
{
  std::vector<double> vector_double;
  vector_double.push_back(4.5);
  vector_double.push_back(1.5);
  vector_double.push_back(3.0); 
  std::vector<double>::iterator vector_begin{vector_double.begin()};
  std::vector<double>::iterator vector_end{vector_double.end()};
  std::vector<double>::iterator vector_iterator;
  for(vector_iterator=vector_begin;
      vector_iterator<vector_end;
      ++vector_iterator)
    std::cout<<*vector_iterator<<std::endl;
  return 0;
}

Download here; To copy and paste: double click inside code, then copy.