main.cpp 1.4 KB

123456789101112131415161718192021222324252627282930
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* main.cpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2026/01/09 14:15:06 by bchanot #+# #+# */
  9. /* Updated: 2026/01/09 14:23:11 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "Swap.hpp"
  13. int main( void ) {
  14. int a = 2;
  15. int b = 3;
  16. ::swap( a, b );
  17. std::cout << "a = " << a << ", b = " << b << std::endl;
  18. std::cout << "min( a, b ) = " << ::min( a, b ) << std::endl;
  19. std::cout << "max( a, b ) = " << ::max( a, b ) << std::endl;
  20. std::string c = "chaine1";
  21. std::string d = "chaine2";
  22. ::swap(c, d);
  23. std::cout << "c = " << c << ", d = " << d << std::endl;
  24. std::cout << "min( c, d ) = " << ::min( c, d ) << std::endl;
  25. std::cout << "max( c, d ) = " << ::max( c, d ) << std::endl;
  26. return 0;
  27. }