#pragma once #include #include template long easyfind(const T& container, const int value) { const typename T::const_iterator iterator = std::find(container.begin(), container.end(), value); if (iterator == container.end()) throw std::runtime_error("Element not found"); return std::distance(container.begin(), iterator); }