| 7 | { |
| 8 | public: |
| 9 | explicit Message(const char* text = "") |
| 10 | : m_text(new char[std::strlen(text) + 1]) // Caution: include the null character! |
| 11 | { |
| 12 | std::strcpy(m_text, text); // Mind the order: strcpy(destination, source)! |
| 13 | } |
| 14 | ~Message() { delete[] m_text; } |
| 15 | |
| 16 | Message(const Message& message); // Copy constructor |
nothing calls this directly
no outgoing calls
no test coverage detected