ex01 done
This commit is contained in:
33
ex01/iter.hpp
Normal file
33
ex01/iter.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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
|
||||
Reference in New Issue
Block a user