close

這種error 一開始我真的毫無頭緒

因為這是一種標準的 TCL宣告

//Wrapper class for CBSP Home Agent
static class ForTCLCBSPHAAgentclass : public TclClass{//the class be created just for return the agent class.
public:
//Agent/CBSPHA is the needy name when you create the agent in TCL
ForTCLCBSPHAAgentclass():TclClass("Agent/CBSPHA"){}

TclObject* create(int, const char*const*){
return(new AgentCBSPHA());
}
}class_cbsp_HA_agent;

真的不懂錯在哪

最後才發現 原來是include HA.h檔的地方 忘了加;

class AgentCBSPHA : public Agent{
public:
AgentCBSPHA();//constructor
virtual void recv(Packet*, Handler *);//the entrance of packet
protected:
virtual int command(int argc, const char* const* argv);
//the interface of communication with TCL
private:
int my_addr;
int data_port;
};

arrow
arrow
    全站熱搜

    LittleChoCho 發表在 痞客邦 留言(0) 人氣()