AddressBooks  Version 0.2
This is flexible sized address book
 All Classes Functions Variables
Vector.h
1 #ifndef VECTOR_H
2 #define VECTOR_H
3 
4 #include <stdexcept>
5 
6 using std::out_of_range;
7 
8 typedef Address storageType;
9 
15 class Vector
16 {
17 private:
21  int count;
25  int size;
33  void grow();
37  void slideUp( int loc );
41  void slideDown( int loc );
42 public:
46  Vector();
47 
51  ~Vector();
52 
57  void add( storageType data );
64  void addAt( storageType data, int location );
65 
73  storageType removeAt( int location ) throw ( out_of_range );
74 
81  storageType itemAt( int location ) const throw ( out_of_range );
82 };
83 
84 #endif