All pastes #1502094 Raw Edit

Stuff

public cpp v1 · immutable
#1502094 ·published 2009-07-21 14:55 UTC
rendered paste body
#include <iostream>#include <string>#include <vector>#include <algorithm>#include <boost/lambda/lambda.hpp>using namespace std;using namespace boost::lambda;int main(void){  string temp;  vector<string> vec;  while (1) {    getline(cin, temp);    if (cin.fail() || temp == "END") {      break;    }    vec.push_back(temp);  }  cout << "Before: " << endl;  for_each(vec.begin(), vec.end(), (cout << _1 << '\n'));  sort(vec.begin(), vec.end());  cout << "After: " << endl;  for_each(vec.begin(), vec.end(), (cout << _1 << '\n'));  return 0;}