-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharray.h
70 lines (47 loc) · 785 Bytes
/
array.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef ARRAY_H
#define ARRAY_H
template <class T> class Array
{
private:
T* array;
public:
//Consructor
Array(int numberOfElements);
//Methods
void insert (T elem);
bool remove (T elem);
bool isExist(T elem);
T get(T index);
//Destructor
~Array();
};
/**
* Constructors
*/
template <class T> Array<T>::Array(int numberOfElements)
{
this->array = new T[numberOfElements];
}
/**
* Public methods
*/
template <class T> void Array<T>::insert(T elem)
{
}
template <class T> bool Array<T>::remove(T elem)
{
}
template <class T> bool Array<T>::isExist(T elem)
{
}
template <class T> T Array<T>::get(T index)
{
}
/**
* Destructor
*/
template <class T> Array<T>::~Array()
{
delete this->array;
}
#endif // ARRAY_H