|
| 1 | +/* ************************************************************************** */ |
| 2 | +/* */ |
| 3 | +/* ::: :::::::: */ |
| 4 | +/* main.cpp :+: :+: :+: */ |
| 5 | +/* +:+ +:+ +:+ */ |
| 6 | +/* By: shovsepy <marvin@42.fr> +#+ +:+ +#+ */ |
| 7 | +/* +#+#+#+#+#+ +#+ */ |
| 8 | +/* Created: 2022年02月01日 21:27:11 by shovsepy #+# #+# */ |
| 9 | +/* Updated: 2022年02月01日 21:32:18 by shovsepy ### ########.fr */ |
| 10 | +/* */ |
| 11 | +/* ************************************************************************** */ |
| 12 | + |
| 13 | +#include "whatever.hpp" |
| 14 | +#include <iostream> |
| 15 | +#include <string> |
| 16 | + |
| 17 | +int main( void ) { |
| 18 | + int a, b; |
| 19 | + float c, d; |
| 20 | + char e, f; |
| 21 | + std::string g, h; |
| 22 | + |
| 23 | + a = 1; |
| 24 | + b = 2; |
| 25 | + c = 4.2f; |
| 26 | + d = 42.21f; |
| 27 | + e = 'x'; |
| 28 | + f = 'y'; |
| 29 | + g = "string1"; |
| 30 | + h = "string2"; |
| 31 | + |
| 32 | + std::cout << "Data to play with\n" << std::endl; |
| 33 | + std::cout << "a: " << a << " and b: " << b << std::endl; |
| 34 | + std::cout << "c: " << c << " and d: " << d << std::endl; |
| 35 | + std::cout << "e: " << e << " and f: " << f << std::endl; |
| 36 | + std::cout << "g: " << g << " and h: " << h << std::endl; |
| 37 | + |
| 38 | + std::cout << "\nNow calling swap on all of these...\n" << std::endl; |
| 39 | + ::swap(a, b); |
| 40 | + ::swap(c, d); |
| 41 | + ::swap(e, f); |
| 42 | + ::swap(g, h); |
| 43 | + |
| 44 | + std::cout << "a: " << a << " and b: " << b << std::endl; |
| 45 | + std::cout << "c: " << c << " and d: " << d << std::endl; |
| 46 | + std::cout << "e: " << e << " and f: " << f << std::endl; |
| 47 | + std::cout << "g: " << g << " and h: " << h << std::endl; |
| 48 | + |
| 49 | + std::cout << "\nLet's find the mins and maxs...\n" << std::endl; |
| 50 | + std::cout << "min(a, b): " << ::min(a, b) << std::endl; |
| 51 | + std::cout << "max(a, b): " << ::max(a, b) << std::endl; |
| 52 | + std::cout << "min(c, d): " << ::min(c, d) << std::endl; |
| 53 | + std::cout << "max(c, d): " << ::max(c, d) << std::endl; |
| 54 | + std::cout << "min(e, f): " << ::min(e, f) << std::endl; |
| 55 | + std::cout << "max(e, f): " << ::max(e, f) << std::endl; |
| 56 | + std::cout << "min(g, h): " << ::min(g, h) << std::endl; |
| 57 | + std::cout << "max(g, h): " << ::max(g, h) << std::endl; |
| 58 | + |
| 59 | + return 0; |
| 60 | +} |
0 commit comments