Website Summary Files Commits Branches @commit @diff @stats
path: root / src / List / List.cpp
diff options
context:
space:
mode:
1 files changed, 5 insertions, 0 deletions
-rw-r--r--src/List/List.cpp5
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];
}