5 #ifndef DSALGLIB_ARRAY_H     6 #define DSALGLIB_ARRAY_H    13                 static const long long int spare = 5;
    14                 long long int count,capacity;
    21                     objs = 
new type[capacity];
    28                     objs = 
new type[capacity];
    35                     if(newsize<capacity) return ;
    38                     objs = 
new type[newsize];
    41                     for(temp=0;temp<count;temp++)
    42                         objs[temp] = old[temp];
    52                     if(index>=0&&index<count)
    80                     type temp = objs[count-1];
    85                 void reverse(
long long int start,
long long int end)
    87                     if(start>=0&&start<count&&end>=0&&end<count)
    91                             swapit(objs[start],objs[end]);
   112                     if(count==0) 
return true; 
return false;
   122                     objs = 
new type[capacity];
   127 #endif //DSALGLIB_ARRAY_H 
void resize(long long int newsize)
array(long long int size, type param)
array(long long int size=0)
void operator=(array< type > from)
type & operator[](long long int index)
void reverse(long long int start, long long int end)
void traverse(void(fun)(type obj))
void push_back(type param)