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
10 months agoVerona
10 months agoTerry
11 months agoFrederica
11 months agoMargret
11 months agoBenton
11 months agoEdna
12 months agoRex
12 months agoGary
12 months agoLyla
12 months agoPearly
12 months agoThurman
12 months agoDiane
12 months agoBurma
1 year agoDorethea
1 year agoAmie
1 year agoTashia
1 year agoFloyd
1 year agoSerita
1 year agoJerry
1 year agoVallie
1 year agoHannah
1 year agoFredric
1 year agoBarb
1 year agoHollis
1 year agoAshlyn
1 year agoRessie
1 year agoTiera
2 years agoDevorah
2 years agoValentine
2 years ago