From 52a866baba3cbb05ecf0be88f1b50991b4a26b52 Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 15 Apr 2020 09:28:09 +0200 Subject: cpp08 probably done, ex02 has a useless file in this implementation? --- cpp08/ex00/easyfind.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 cpp08/ex00/easyfind.hpp (limited to 'cpp08/ex00/easyfind.hpp') diff --git a/cpp08/ex00/easyfind.hpp b/cpp08/ex00/easyfind.hpp new file mode 100644 index 0000000..68e176c --- /dev/null +++ b/cpp08/ex00/easyfind.hpp @@ -0,0 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* easyfind.hpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: charles +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/04/15 05:53:04 by charles #+# #+# */ +/* Updated: 2020/04/15 06:47:27 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef EASYFIND_HPP +# define EASYFIND_HPP + +# include + +template +typename T::iterator easyfind(T& container, int x) +{ + return std::find(container.begin(), container.end(), x); +} + +#endif -- cgit