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
26
int
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
}
iostream
std::endl
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
std::cout
ostream cout
Fixed
ex00 Fixed Class
Definition
Fixed.hpp:28
Fixed::max
static Fixed & max(Fixed &a, Fixed &b)
Static member function to find the maximum of two Fixed objects (non-const).
Definition
Fixed.cpp:215
main
int main(void)
Definition
main.cpp:25
Fixed.hpp
Header file for the Fixed class representing fixed-point numbers with overloaded operators and min/ma...
ex02
main.cpp
構築:
1.9.8