d07 ex00 ok

This commit is contained in:
hugogogo
2022-03-10 17:35:52 +01:00
parent 31c9d8af06
commit a8b1a6af1b
7 changed files with 127 additions and 36 deletions

24
d07/ex00/main.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include <iostream>
#include <string>
#include "Templates.hpp"
int main() {
int a = 2;
int b = 3;
::swap( a, b );
std::cout << "a = " << a << ", b = " << b << std::endl;
std::cout << "min( a, b ) = " << ::min( a, b ) << std::endl;
std::cout << "max( a, b ) = " << ::max( a, b ) << std::endl;
std::string c = "chaine1";
std::string d = "chaine2";
::swap(c, d);
std::cout << "c = " << c << ", d = " << d << std::endl;
std::cout << "min( c, d ) = " << ::min( c, d ) << std::endl;
std::cout << "max( c, d ) = " << ::max( c, d ) << std::endl;
return 0;
}