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
8 months agoVerona
9 months agoTerry
9 months agoFrederica
9 months agoMargret
9 months agoBenton
10 months agoEdna
10 months agoRex
10 months agoGary
10 months agoLyla
10 months agoPearly
10 months agoThurman
10 months agoDiane
10 months agoBurma
10 months 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
1 year agoDevorah
1 year agoValentine
1 year ago