29 lines
1.1 KiB
C++
29 lines
1.1 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* iter.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2026/03/23 14:19:16 by aortigos #+# #+# */
|
|
/* Updated: 2026/04/08 20:32:50 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef ITER_HPP
|
|
|
|
# define ITER_HPP
|
|
|
|
# include <iostream>
|
|
|
|
template <typename PTR, typename T>
|
|
void iter(PTR *address, unsigned int const length, T func)
|
|
{
|
|
for (unsigned int i = 0; i < length; i++)
|
|
{
|
|
func(address[i]);
|
|
}
|
|
}
|
|
|
|
#endif
|