CPP02 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
main.cpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* main.cpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/04/28 17:11:38 by kamitsui #+# #+# */
9/* Updated: 2025/05/06 15:39:56 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
22#include "Fixed.hpp"
23#include <iostream>
24
26int main(void) {
27 Fixed a;
28 Fixed const b(Fixed(5.05f) * Fixed(2));
29
30 std::cout << a << std::endl;
31 std::cout << ++a << std::endl;
32 std::cout << a << std::endl;
33 std::cout << a++ << std::endl;
34 std::cout << a << std::endl;
35
36 std::cout << b << std::endl;
37
38 std::cout << Fixed::max(a, b) << std::endl;
39
40 return 0;
41}
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
ostream cout
ex00 Fixed Class
Definition Fixed.hpp:28
static Fixed & max(Fixed &a, Fixed &b)
Static member function to find the maximum of two Fixed objects (non-const).
Definition Fixed.cpp:215
int main(void)
Definition main.cpp:25
Header file for the Fixed class representing fixed-point numbers with overloaded operators and min/ma...