From c1c753cbbd384a46c6a81a62e667347299757267 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 28 Apr 2022 19:05:37 +0300 Subject: Autocommit at 28.04.2022 @ 19:05 --- src/List/List.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/List/List.h (limited to 'src/List/List.h') diff --git a/src/List/List.h b/src/List/List.h new file mode 100644 index 0000000..c6f074d --- /dev/null +++ b/src/List/List.h @@ -0,0 +1,27 @@ +#ifndef HEADER_LIST +#define HEADER_LIST + +template +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); + + List(); + List& operator=(const List& other); + List(const List& other); + ~List(); + + List(List&& other); + List& operator=(List&& other); +}; + +#endif -- cgit v1.3.1-26-gb76a