// Code derived from Stroustrup's PPP2 book// § 5.6.2 Range errors// -and beginning on p 148#include<iostream>#include<vector>usingstd::cin;usingstd::cout;usingstd::vector;intmain(){cout<<"Please enter integers: (enter '|' to stop):\n";vector<int>v;// a vector of intsfor(inti;cin>>i;)// get valuesv.push_back(i);for(unsignedinti=0;i<=v.size();++i)// print valuescout<<"v["<<i<<"] == "<<v[i]<<'\n';}