Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Set {
- private:
- std::vector<int> _vec;
- int _evens;
- public:
- Set();
- void putIn(int e);
- void deleteItem(int e);
- bool isEmpty() const {return _vec.size == 0;};
- bool isIn(int e) const;
- int getEvens() const;
- void print() const;
- friend std::ostream& operator<< (std::ostream& s, const Set& a);
- };
- std::ostream& operator<< (std::ostream& s, const Set& a) {
- for(int i = 0; i < a._vec.size() - 1; i++){
- s << a._vec[i] << " ";
- }
- s << std::endl;
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement