33 lines
1.1 KiB
C++
33 lines
1.1 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* iter.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2026/03/21 15:53:06 by aortigos #+# #+# */
|
|
/* Updated: 2026/03/21 16:58:31 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef ITER_HPP
|
|
|
|
# define ITER_HPP
|
|
|
|
# include <iostream>
|
|
# include <cctype>
|
|
|
|
template <typename PTR, typename F>
|
|
void iter(PTR *address, size_t const lenght, F func)
|
|
{
|
|
size_t i;
|
|
|
|
i = 0;
|
|
while (i < lenght)
|
|
{
|
|
func(address[i]);
|
|
i++;
|
|
}
|
|
}
|
|
|
|
#endif |