CPP02/ex01/src/main.cpp
2025-03-25 15:31:01 +01:00

35 lines
1.5 KiB
C++

/* ************************************************************************** */
/* */
/* :::::::: */
/* main.cpp :+: :+: */
/* +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2025/03/24 15:31:26 by whaffman #+# #+# */
/* Updated: 2025/03/25 11:40:20 by whaffman ######## odam.nl */
/* */
/* ************************************************************************** */
#include <iostream>
#include "Fixed.hpp"
int main(void)
{
Fixed a;
Fixed const b(10);
Fixed const c(42.42f);
Fixed const d(b);
a = Fixed(1234.6321f);
std::cout << "a is " << a << std::endl;
std::cout << "b is " << b << std::endl;
std::cout << "c is " << c << std::endl;
std::cout << "d is " << d << std::endl;
std::cout << "a is " << a.toInt() << " as integer" << std::endl;
std::cout << "b is " << b.toInt() << " as integer" << std::endl;
std::cout << "c is " << c.toInt() << " as integer" << std::endl;
std::cout << "d is " << d.toInt() << " as integer" << std::endl;
return 0;
}