#include #include #include "Container.h" using namespace std; void Container::Insert(int d){ data.push_back(d); } bool Container::Find(int d) const{ return (find(begin(data),end(data),d) != end(data)); } size_t Container::Size(void) const{ return data.size(); } void Container::Delete(int d){ vector::iterator pos; pos = find(begin(data),end(data),d); if (pos != end(data)) { data.erase(pos); } } int & Container::operator[](size_t d){ //cout << "In the non const version of [] " << endl; if (d < data.size()) { return data[d]; } return data[0]; } const int & Container::operator[](size_t d) const{ //cout << "In the const version of [] " << endl; if (d < data.size()) { return data[d]; } return data[0]; }