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

Method who

Exercises/Modules/Chapter 15/Soln15_01/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// Make like a sheep
17std::string_view Sheep::sound() const

Callers 1

showAnimalsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected