-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
50 lines (40 loc) · 1.96 KB
/
main.cpp
File metadata and controls
50 lines (40 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zelhajou <zelhajou@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/01 21:21:25 by zelhajou #+# #+# */
/* Updated: 2025/01/03 14:35:06 by zelhajou ### ########.fr */
/* */
/* ************************************************************************** */
#include <iostream>
#include "whatever.hpp"
int main(void)
{
int a = 2;
int b = 3;
std::cout << "Before swap: a = " << a << ", b = " << b << std::endl;
::swap(a, b);
std::cout << "After swap: 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::cout << "\n";
std::string c = "Hello!";
std::string d = "Hola!";
std::cout << "Before swap: c = " << c << ", d = " << d << std::endl;
::swap(c, d);
std::cout << "After swap: 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;
std::cout << "\n";
float e = 42.42f;
float f = 42.43f;
std::cout << "Before swap: e = " << e << ", f = " << f << std::endl;
::swap(e, f);
std::cout << "After swap: e = " << e << ", f = " << f << std::endl;
std::cout << "min(e, f) = " << ::min(e, f) << std::endl;
std::cout << "max(e, f) = " << ::max(e, f) << std::endl;
return 0;
}