CPP04
1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Brain.hpp
[詳解]
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* Brain.hpp :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/05/20 23:16:54 by kamitsui #+# #+# */
9
/* Updated: 2025/05/28 23:57:34 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
23
#ifndef BRAIN_HPP
24
#define BRAIN_HPP
25
26
#include <
iostream
>
27
#include <
string
>
28
37
class
Brain
{
38
private
:
39
std::string
ideas[100];
40
41
public
:
42
Brain
();
43
Brain
(
const
Brain
&other);
44
Brain
&
operator=
(
const
Brain
&other);
45
~Brain
();
46
47
void
setIdea
(
int
index,
const
std::string
&idea);
48
const
std::string
&
getIdea
(
int
index)
const
;
49
};
50
51
#endif
std::string
Brain
Represents the brain of an animal, holding a collection of ideas.
Definition
Brain.hpp:37
Brain::getIdea
const std::string & getIdea(int index) const
Brain::Brain
Brain(const Brain &other)
Brain::operator=
Brain & operator=(const Brain &other)
Brain::Brain
Brain()
Brain::setIdea
void setIdea(int index, const std::string &idea)
Brain::~Brain
~Brain()
iostream
string
ex02
Brain.hpp
構築:
1.9.8