What will happen when you attempt to compile and run the code below, assuming that file test.in contains the following sequence: 1 2 3?
#include
#include
#include
#include
#include
using namespace std;
template
ostream & out;
Out(ostream & o): out(o){}
void operator() (const T & val ) {out< int main () { ifstream f("test.in"); list for( ; f.good() ; ) { int i; f>>i; l.push_back(i); } f.close(); for_each(l.begin(), l.end(), Out return 0; } Program will output:
Lourdes
6 months agoVerona
6 months agoTerry
7 months agoFrederica
7 months agoMargret
7 months agoBenton
7 months agoEdna
7 months agoRex
8 months agoGary
8 months agoLyla
8 months agoPearly
8 months agoThurman
8 months agoDiane
8 months agoBurma
8 months agoDorethea
1 year agoAmie
1 year agoTashia
1 year agoFloyd
11 months agoSerita
12 months agoJerry
12 months agoVallie
12 months agoHannah
1 year agoFredric
11 months agoBarb
11 months agoHollis
12 months agoAshlyn
1 year agoRessie
12 months agoTiera
1 year agoDevorah
1 year agoValentine
1 year ago