Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // variable size array class
- // Mikhail Nesterenko
- // 11/06/2009
- #ifndef VARARRAY_H_
- #define VARARRAY_H_
- #include <iostream>
- using namespace std;
- class varArray{
- public:
- varArray(void); // void constructor
- void sortNumber();
- 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
- // big three
- varArray(const varArray&); // copy constructor
- varArray& operator=(const varArray&); // overloaded assignment
- ~varArray(void); // destructor
- private:
- int *array; // pointer to the dynamically allocated array
- int size; // array size
- };
- #endif /* VARARRAY_H_ */
Advertisement
Add Comment
Please, Sign In to add comment