diff options
Autocommit at 02.05.2022 @ 21:40
1 files changed, 5 insertions, 0 deletions
| -rw-r--r-- | src/List/List.cpp | 5 |
diff --git a/src/List/List.cpp b/src/List/List.cpp index d5c2f04..d455c04 100644 --- a/src/List/List.cpp +++ b/src/List/List.cpp @@ -72,6 +72,11 @@ unsigned List<T>::findIndex(const T& element) const { } template <class T> +bool List<T>::contain(const T& element) const { + return findIndex(element) < count; +} + +template <class T> T& List<T>::operator[](unsigned index) { return elements[index]; } |
