aboutsummaryrefslogtreecommitdiff
path: root/cpp02/ex02/main.cpp
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-19 12:42:39 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-19 12:42:39 +0200
commit60c4c5309af87480fb32f3815bc02031eff43e9b (patch)
tree7e50e0728d320735ea3fbcf2ff10d2239acf97a1 /cpp02/ex02/main.cpp
parenta3ff15046fa3d367ff7304dc9482e81597eb76b9 (diff)
downloadpiscine_cpp-60c4c5309af87480fb32f3815bc02031eff43e9b.tar.gz
piscine_cpp-60c4c5309af87480fb32f3815bc02031eff43e9b.tar.bz2
piscine_cpp-60c4c5309af87480fb32f3815bc02031eff43e9b.zip
Added cpp02/ex02
Diffstat (limited to 'cpp02/ex02/main.cpp')
-rw-r--r--cpp02/ex02/main.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/cpp02/ex02/main.cpp b/cpp02/ex02/main.cpp
new file mode 100644
index 0000000..7625260
--- /dev/null
+++ b/cpp02/ex02/main.cpp
@@ -0,0 +1,30 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* main.cpp :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/04/13 11:51:15 by charles #+# #+# */
+/* Updated: 2020/10/19 12:42:08 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include <iostream>
+#include "Fixed.hpp"
+
+int main(void)
+{
+ Fixed a;
+ Fixed const b(Fixed(5.05f) * Fixed(2));
+
+ std::cout << a << std::endl;
+ std::cout << ++a << std::endl;
+ std::cout << a << std::endl;
+ std::cout << a++ << std::endl;
+ std::cout << a << std::endl;
+ std::cout << b << std::endl;
+ std::cout << Fixed::max(a, b) << std::endl;
+
+ return 0;
+}