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:
Dorethea
3 months agoAmie
3 months agoTashia
3 months agoFloyd
2 months agoSerita
2 months agoJerry
2 months agoVallie
2 months agoHannah
3 months agoFredric
2 months agoBarb
2 months agoHollis
2 months agoAshlyn
3 months agoRessie
2 months agoTiera
4 months agoDevorah
5 months agoValentine
5 months ago