// Code derived from Stroustrup's PPP2 book// § 4.6 vector// -and beginning on p 118#include"../std_lib_facilities.h"intmain(){vector<int>v={5,7,9,4,6,8};// vector of 6 intsvector<string>philosophers={"Kant","Plato","Hume","Kierkegaard"};// vector of 4 strings// output above variable values to console...for(inte:v)cout<<e<<'\n';cout<<'\n';//-----------for(stringphilosopher:philosophers)cout<<philosopher<<'\n';}
Warning
LINK
You are about to visit a link which has been flagged with the above content warnings. Do you wish to continue?