-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArray.h
More file actions
43 lines (27 loc) · 703 Bytes
/
Copy pathArray.h
File metadata and controls
43 lines (27 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Honor Pledge: ashstrin
//
//I pledge that I have neither given nor received any help
//on this assignment.
#ifndef _ARRAY_H_
#define _ARRAY_H_
#include <cstring>
#include "Array_Base.h"
template <typename T>
class Array : public Array_Base<T>{
public:
typedef T type;
Array (void);
Array (size_t length);
Array (size_t length, T fill);
Array (const Array & arr);
const Array & operator = (const Array & rhs);
T & operator [] (size_t index);
const T & operator [] (size_t index) const;
void resize(size_t new_size);
bool operator == (const Array & rhs) const;
bool operator != (const Array & rhs) const;
void shrink();
private:
};
#include "Array.cpp"
#endif