#include #include #include #include "SillyT.h" #include "SillyT.h" using namespace std; int main() { vector list(20); vector::iterator pos; SillyT a; SillyT b; a.Int(5); a.String("Find Me"); list.push_back(a); a.String("Bind Me"); list.push_back(a); for(auto & x : list) { cout << x.Int() << " " << x.String(); cout << endl; } cout << endl << endl; sort(begin(list), end(list)); for(auto & x : list) { cout << x.Int() << " " << x.String(); cout << endl; } cout << endl << endl; if( find( list.begin(), list.end(), a) != list.end()) { cout << "Found "; } else { cout << "Did not find "; } cout << a.Int() << " " << a.String(); cout << endl; cout << endl << endl; if( find( list.begin(), list.end(), b) != list.end()) { cout << "Found "; } else { cout << "Did not find "; } cout << b.Int() << " " << b.String(); cout << endl; }