CPP04 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
WrongAnimal.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* WrongAnimal.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/05/20 16:26:33 by kamitsui #+# #+# */
9/* Updated: 2025/05/28 23:58:10 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
21#ifndef WRONGANIMAL_HPP
22#define WRONGANIMAL_HPP
23
24#include <iostream>
25#include <string>
26
35class WrongAnimal {
36 protected:
38
39 public:
41 WrongAnimal(const WrongAnimal &other);
43 virtual ~WrongAnimal();
44
45 void makeSound() const;
46 const std::string &getType() const;
47};
48
49#endif
The WrongAnimal class represents a generic animal, used to demonstrate the LACK of polymorphism when ...
std::string type
WrongAnimal & operator=(const WrongAnimal &other)
const std::string & getType() const
void makeSound() const
virtual ~WrongAnimal()
WrongAnimal(const WrongAnimal &other)