============================================================
博文原创,转载请声明出处
电子咖啡(原id蓝岩)
============================================================
c++中,成员函数生命时候初始化会有异常如下:
In-class initialization of non-static data member accepted as a C++11 extension
不可以直接初始话,需要再构造函数中初始化,如下
MessageManage() : m_session( 0 ), m_messageEventFilter( 0 ), m_chatStateFilter( 0 ),chatDelegant(0),delegant(0) {}
构造函数对成员进行初始化时候,如果要将成员变量初始化,则参数为0。