/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/09/05 08:14:45 by narnaud #+# #+# */ /* Updated: 2022/09/05 08:43:03 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include #include "iter.hpp" template void put_t(T t) { std::cout << t << std::endl; } template void put_square(T t) { put_t(t * t); } int main(void) { int nbrs[5] = {1, 2, 3 , 4, 5}; char words[5][4] = {"the", "one", "two", "get", "any"}; iter(nbrs, 5, put_t); iter(nbrs, 3, put_square); iter(words, 5, put_t); }