#include <iostream>
#include <list>
#include <algorithm>
#include <cstdlib>

#include "Amoeba.h"

using namespace std;

void PrintOut(const Amoeba &p) {
  cout << "  printout: " << p << endl;
}

int main(int argc, char **argv) {
  Amoeba a("Allen"), b("Barb"), c("Carol");
  list<Amoeba> lst;

  lst.push_back(c);
  lst.push_back(a);
  lst.push_back(b);

  cout << "sort:" << endl;
  lst.sort();
  cout << "done sort!" << endl;
  for_each(lst.begin(), lst.end(), &PrintOut);

  return EXIT_SUCCESS;
}