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
37class Brain {
38 private:
39 std::string ideas[100];
40
41 public:
43 Brain(const Brain &other);
44 Brain &operator=(const Brain &other);
46
47 void setIdea(int index, const std::string &idea);
48 const std::string &getIdea(int index) const;
49};
50
51#endif
Represents the brain of an animal, holding a collection of ideas.
Definition Brain.hpp:37
const std::string & getIdea(int index) const
Brain(const Brain &other)
Brain & operator=(const Brain &other)
void setIdea(int index, const std::string &idea)