MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / who

Method who

Exercises/Modules/Chapter 15/Soln15_03/Animals.cpp:11–14  ·  view source on GitHub ↗

Return string describing the animal

Source from the content-addressed store, hash-verified

9
10// Return string describing the animal
11std::string Animal::who() const
12{
13 return "My name is " + m_name + ". My weight is " + std::to_string(m_weight) + " lbs.";
14}
15
16// Sheep constructors
17Sheep::Sheep(std::string_view name, unsigned weight)

Callers 1

showAnimalsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected