blob: 2b5fc001b74d2e91b759d1a126cf83065b07dbcd (
plain) (
blame)
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
|
#ifndef HEADER_LIST
#define HEADER_LIST
template <class T>
class List {
T* elements;
unsigned length;
unsigned count;
void resize();
void free();
void copyFrom(const List& other);
public:
void add(const T& element);
bool removeAt(unsigned index);
T& operator[](unsigned index);
const T& operator[](unsigned index) const;
unsigned get_length() const;
unsigned get_count() const;
List();
List& operator=(const List& other);
List(const List& other);
~List();
List(List&& other);
List& operator=(List&& other);
};
#endif
|