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