From 60c4c5309af87480fb32f3815bc02031eff43e9b Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 19 Oct 2020 12:42:39 +0200 Subject: Added cpp02/ex02 --- cpp02/ex02/main.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 cpp02/ex02/main.cpp (limited to 'cpp02/ex02/main.cpp') 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 +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/04/13 11:51:15 by charles #+# #+# */ +/* Updated: 2020/10/19 12:42:08 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include +#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; +} -- cgit