CPP0X_Base
1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Example.cpp
[詳解]
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* Example.cpp :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/04/26 16:32:47 by kamitsui #+# #+# */
9
/* Updated: 2025/05/01 23:51:10 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
17
#include "
Example.hpp
"
18
#include <
iostream
>
19
20
Example::Example
() : message(
"Hello, Example!"
) {}
21
22
Example::Example
(
const
std::string
&msg) : message(msg) {}
23
24
void
Example::setMessage
(
const
std::string
&new_msg) { message = new_msg; }
25
26
std::string
Example::getMessage
()
const
{
return
message; }
27
28
void
Example::printMessage
()
const
{
std::cout
<< message <<
std::endl
; }
Example.hpp
Example クラスの定義
std::string
Example::setMessage
void setMessage(const std::string &new_msg)
メッセージを設定します。
Definition
Example.cpp:24
Example::Example
Example()
デフォルトコンストラクタ
Definition
Example.cpp:20
Example::printMessage
void printMessage() const
メッセージを出力します。
Definition
Example.cpp:28
Example::getMessage
std::string getMessage() const
メッセージを取得します。
Definition
Example.cpp:26
std::cout
std::endl
T endl(T... args)
iostream
ex0X
Example.cpp
構築:
1.9.8