You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
1016 B

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* iter.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/05 08:14:42 by narnaud #+# #+# */
/* Updated: 2022/09/05 08:33:06 by narnaud ### ########.fr */
/* */
/* ************************************************************************** */
template <class T>
void iter(T *arr, int length, void (*fct)(T)) {
for (int i = 0; i < length; i++) {
fct(arr[i]);
}
}