cpp/cpp07/ex01/iter.hpp
Alexandre POMMIER 320017fc09 start cpp07 ex02
2022-08-07 17:11:12 +02:00

18 lines
1013 B
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* iter.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/08/06 20:21:25 by apommier #+# #+# */
/* Updated: 2022/08/07 15:43:16 by apommier ### ########.fr */
/* */
/* ************************************************************************** */
template<typename T>
void iter(T *tab, int size, void (*ft)(const T &))
{
for (int i = 0; i < size; i++)
ft(tab[i]);
}