You are viewing a single comment's thread. Return to all comments →
class Message { public: Message() {} Message (const string& m) : m_Id(s_Id++), m_Message(m) {} const string& get_text() { return m_Message; } bool operator<(const Message& toCompare) { return m_Id < toCompare.m_Id; } static int s_Id; private: int m_Id; string m_Message; }; int Message::s_Id = 0; class MessageFactory { public: MessageFactory() {} Message create_message(const string& text) { return Message(text); } };``
Seems like cookies are disabled on this browser, please enable them to open this website
Messages Order
You are viewing a single comment's thread. Return to all comments →