Skip to content

Commit a4d8744

Browse files
easyfind
1 parent df4bd1b commit a4d8744

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

CPP_Module_08/ex00/easyfind.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* ************************************************************************** */
2+
/* */
3+
/* ::: :::::::: */
4+
/* easyfind.hpp :+: :+: :+: */
5+
/* +:+ +:+ +:+ */
6+
/* By: shovsepy <marvin@42.fr> +#+ +:+ +#+ */
7+
/* +#+#+#+#+#+ +#+ */
8+
/* Created: 2022/02/05 15:45:14 by shovsepy #+# #+# */
9+
/* Updated: 2022/02/05 15:50:27 by shovsepy ### ########.fr */
10+
/* */
11+
/* ************************************************************************** */
12+
13+
#pragma once
14+
15+
#include <algorithm>
16+
17+
template <typename T>
18+
typename T::iterator easyfind(T& container, int val)
19+
{
20+
return (std::find(container.begin(), container.end(), val));
21+
}

0 commit comments

Comments
 (0)