使用未定义的标识符?功能指针

时间:2014-03-06 12:32:27

标签: c++ pointers

我有编译错误,我不知道为什么。这是标题代码:

文件:AuthSession.hpp

class AuthSession
: public Player,
  public boost::enable_shared_from_this<AuthSession>
{
public:
    AuthSession(boost::asio::io_service& io_service, PlayerList& player_list)
    : socket_(io_service),
    player_list_(player_list)
    {
    }

    ~AuthSession(){
    }
    //some functions
};

文件:Opcodes.hpp

#include "../Player/AuthSession.hpp"

struct OpcodeHandler
{
    char const* name;
    SessionStatus status;
    void (AuthSession::*handler)(AuthMessage& recvPacket); //Error here : Undefined Authsession
};

我的文件很大,所以我删除了不必要的代码..有人能帮帮我吗?

0 个答案:

没有答案