Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // variable size container class implemented with vectors
- // Cador Venix
- // 11/12/2012
- #ifndef VECTORSOO_H_
- #define VECTORSOO_H_
- #include <vector>
- #include <iostream>
- #include <algorithm>
- using namespace std;
- class vectorsoo{
- public:
- void addNumber(int); // adds number to the array
- void removeNumber(int); // deletes the number from the array
- void output(void); // prints the values of the array in sorted order
- // note that the big three member functions are not needed
- // as vector class handles dynamic allocation properly
- // by itself
- private:
- vector<int> container;
- };
- #endif /* VECTORSOO_H_ */
Advertisement
Add Comment
Please, Sign In to add comment