| 123456789101112131415161718192021222324252627282930313233 |
- /* ************************************************************************** */
- /* */
- /* ::: :::::::: */
- /* main.cpp :+: :+: :+: */
- /* +:+ +:+ +:+ */
- /* By: bchanot <bchanot@gmail.fr> +#+ +:+ +#+ */
- /* +#+#+#+#+#+ +#+ */
- /* Created: 2025/07/17 15:10:40 by bchanot #+# #+# */
- /* Updated: 2025/07/17 17:36:23 by bchanot ### ########.fr */
- /* */
- /* ************************************************************************** */
- #include "Fixed.class.hpp"
- #include <iostream>
- int main( void ) {
- Fixed a;
- Fixed const b( 10 );
- Fixed const c( 42.42f );
- Fixed const d( b );
- a = Fixed( 1234.4321f );
- 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;
- }
|