return m_ctx;
中{strong} {1}} TcpClient.cpp 中的错误:使用未声明的标识符' m_ctx&# 39;
Initable.h
getConnection
TcpClient.h
#ifndef __L2P__Initable__
#define __L2P__Initable__
#include <iostream>
namespace l2 {
namespace utils {
template <typename CTX>
class Initable {
protected:
CTX m_ctx;
public:
void init(CTX ctx);
};
}
}
#endif /* defined(__L2P__Creatable__) */
TcpClient.cpp
#ifndef __L2P__TcpClient__
#define __L2P__TcpClient__
#include <iostream>
#include "../utils/Initable.h"
#include "TcpConnection.h"
namespace l2 {
namespace net {
template <typename CONN>
class TcpClient : public utils::Initable<CONN *> {
public:
CONN * getConnection();
virtual void init(CONN * ctx);
};
}
}
#endif /* defined(__L2P__TcpClient__) */