Hi,
I am using two classes in my C++ application. The code is as follows:
class MyMessageBox
{
public:
void sendMessage(Message *msg, User *recvr);
Message receiveMessage();
list<Message> dataMessageList;
};
class User
{
public:
MyMessageBox *dataMsgBox;
};
The msg is a pointer to a derived class object of Message class. I have implemented the function sendMessage as follows:
void MyMessageBox::sendMessage(Message *msg, User *recvr)
{
Message &msgRef = *msg;
recvr->dataMsgBox->dataMessageList.push_back(msgRef);
}
When I compile this code, I get the following error: undefined reference to `vtable for Message'. Please help me out to solve this issue.
Thanks, Rakesh.