#ifndef EASYFIND_HPP #define EASYFIND_HPP #include #include template typename T::iterator easyfind(T &cont, int val) { typename T::iterator it = std::find(cont.begin(), cont.end(), val); if (it == cont.end()) throw std::exception(); return it; } #endif