CPP01
1.0
読み取り中…
検索中…
一致する文字列を見つけられません
main.cpp
[詳解]
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* main.cpp :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/04/19 22:03:56 by kamitsui #+# #+# */
9
/* Updated: 2025/04/23 00:50:02 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
18
#include "
Harl.hpp
"
19
27
int
main
() {
28
Harl
karen;
29
30
karen.
complain
(
"DEBUG"
);
31
std::cout
<<
std::endl
;
32
karen.
complain
(
"INFO"
);
33
std::cout
<<
std::endl
;
34
karen.
complain
(
"WARNING"
);
35
std::cout
<<
std::endl
;
36
karen.
complain
(
"ERROR"
);
37
std::cout
<<
std::endl
;
38
karen.
complain
(
"OTHER"
);
// Test with an unknown level
39
40
return
0;
41
}
Harl.hpp
Declares the Harl class, which can complain at different levels.
std::endl
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
std::cout
ostream cout
Harl
Represents a Harl character who can complain at different levels.
Definition
Harl.hpp:28
Harl::complain
void complain(std::string level)
Makes Harl complain based on the specified level.
Definition
Harl.cpp:101
main
int main()
Main function of the program.
Definition
main.cpp:44
ex05
main.cpp
構築:
1.9.8