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