All pastes #239622 Raw Edit

Someone

public cpp v1 · immutable
·published 2006-11-05 12:31 UTC
rendered paste body
#include <fstream>#include <iostream>#include <string>#include <algorithm>#include <list>#include <stdexcept>using namespace std;int main(){  list<string> l;  ifstream in("test.txt");  try  {	  copy( istream_iterator<string>(in), istream_iterator<string>(), l.begin() );  	  copy( l.begin(), l.end(), ostream_iterator<string>(cout) );  }  catch(std::exception &e)  {	  cerr<<e.what()<<endl;  }  catch(...)  {	  cerr<<"unknown"<<endl;  }  return 0;}