ex00 done

This commit is contained in:
2026-03-21 15:52:07 +01:00
commit f05f057399
3 changed files with 118 additions and 0 deletions

45
ex00/whatever.hpp Normal file
View File

@@ -0,0 +1,45 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* whatever.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/03/21 15:44:59 by aortigos #+# #+# */
/* Updated: 2026/03/21 15:48:28 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SWAP_HPP
# define SWAP_HPP
# include <iostream>
template <typename T>
void swap(T &a, T &b)
{
T tmp;
tmp = a;
a = b;
b = tmp;
}
template <typename T>
T min(T const &a, T const &b)
{
if (a < b)
return (a);
return (b);
}
template <typename T>
T max(T const &a, T const &b)
{
if (a > b)
return (a);
return (b);
}
#endif