I am getting an error which I don't understand. I'm sure it is quite simple.. but I am still learning C++. I'm not sure if it is related to my parameters being exactly the same for the pure virtual function declaration or if it is something else.
Here is my simplified code:
in header_A.h
class HandlerType
{
public:
virtual void Rxmsg(same parameters) = 0; //pure virtual
};
--------------------------------------------------
in header_B.h
class mine : public HandlerType
{
public:
virtual void myinit();
void Rxmsg(same parameters); // here I have the same parameter list
//except I have to fully qualify the types since I'm not in the same namespace
};
--------------------------------------------------
in header_C.h
class localnode
{
public:
virtual bool RegisterHandler(int n, HandlerType & handler);
};
--------------------------------------------------
in B.cpp
using mine;
void mine::myinit()
{
RegisterHandler(123, Rxmsg); //this is where I am getting the error
}
void Rxmsg(same parameters)
{
do something;
}
Aucun commentaire:
Enregistrer un commentaire