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

Method toString

Exercises/Modules/Chapter 16/Soln16_06/Customer.cpp:18–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16{}
17
18std::string Customer::toString() const
19{
20 std::string result;
21 result += m_surname;
22 result += ' ';
23 result += m_name;
24 result += ", ";
25 result += m_street;
26 result += ' ';
27 result += std::to_string(m_streetNumber);
28 result += ", ";
29 result += m_city;
30 return result;
31}

Callers 1

printFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected