#include #include #include "Tracer.h" using std::cout; using std::endl; using std::vector; int main(int argc, char **argv) { Tracer a, b, c; vector vec; vec.push_back(a); vec.push_back(b); vec.push_back(c); cout << "\nIterating:" << endl; // "auto" is a C++11 feature not available on older compilers // Could also do "for (auto p : vec)" since copying iterators is cheap for (const auto &p : vec) { cout << p << endl; } cout << "Done iterating!" << endl << endl; return EXIT_SUCCESS; }