vimix

.h

Apr 17th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. // variable size container class implemented with vectors
  2. // Cador Venix
  3. // 11/12/2012
  4.  
  5.  
  6. #ifndef VECTORSOO_H_
  7. #define VECTORSOO_H_
  8.  
  9. #include <vector>
  10. #include <iostream>
  11. #include <algorithm>
  12. using namespace std;
  13.  
  14. class vectorsoo{
  15. public:
  16. void addNumber(int); // adds number to the array
  17. void removeNumber(int); // deletes the number from the array
  18. void output(void); // prints the values of the array in sorted order
  19.  
  20. // note that the big three member functions are not needed
  21. // as vector class handles dynamic allocation properly
  22. // by itself
  23.  
  24. private:
  25. vector<int> container;
  26. };
  27.  
  28. #endif /* VECTORSOO_H_ */
Advertisement
Add Comment
Please, Sign In to add comment