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