#include #include #include #include "Tracer.h" using std::cout; using std::endl; using std::vector; using std::sort; void PrintOut(const Tracer &p) { cout << " printout: " << p << endl; } int main(int argc, char **argv) { Tracer a, b, c; vector vec; vec.push_back(c); vec.push_back(a); vec.push_back(b); cout << "sort:" << endl; sort(vec.begin(), vec.end()); cout << "done sort!" << endl; for_each(vec.begin(), vec.end(), &PrintOut); return EXIT_SUCCESS; }