CPP04
1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Animal.hpp
[詳解]
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* Animal.hpp :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/05/20 16:24:30 by kamitsui #+# #+# */
9
/* Updated: 2025/05/20 23:18:05 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
21
#ifndef ANIMAL_HPP
22
#define ANIMAL_HPP
23
24
#include <
iostream
>
25
#include <
string
>
26
37
class
Animal
{
38
protected
:
39
std::string
type
;
40
41
public
:
42
Animal
();
43
Animal
(
const
Animal
&other);
44
Animal
&
operator=
(
const
Animal
&other);
45
virtual
~Animal
();
46
47
virtual
void
makeSound
()
const
;
48
const
std::string
&
getType
()
const
;
49
};
50
51
#endif
std::string
Animal
The Animal class represents a generic animal.
Definition
Animal.hpp:37
Animal::~Animal
virtual ~Animal()
Animal::Animal
Animal()
Animal::getType
const std::string & getType() const
Animal::operator=
Animal & operator=(const Animal &other)
Animal::makeSound
virtual void makeSound() const
Animal::Animal
Animal(const Animal &other)
Animal::type
std::string type
Definition
Animal.hpp:39
iostream
string
ex01
Animal.hpp
構築:
1.9.8