I am trying to create a derived class object in base class method.
I am getting the error as mentioned above. Below is a code snippet.
Any help?
---- Voip_connection.hh ----
#ifndef __VOIP_CONNECTION_HH
#define __VOIP_CONNECTION_HH
class VoipConnection {
public:
VoipConnection();
VoipConnection (ConnectionState* cs);
void update_last_data_rcvd_time() { last_data_rcvd_time_ = msec_time(); }
uint64_t last_data_rcvd_time() { return last_data_rcvd_time_; }
void set_voip_proto(int proto) { voip_proto_ = proto;}
~VoipConnection()
{
--nx_stat().act_connections;
voip_idle_wait_timer_clear();
sv_streaming_offset_ = 0;
cl_streaming_offset_ = 0;
}
// Lots and Lots of Other stuff
}
----Voip_sip.hh -----
#ifndef __VOIP_SIP_HH
#define __VOIP_SIP_HH
#include "voip_connection.hh"
class SipObj: public VoipConnection
{
/* stuff */
}
--- Voip_connection.cc ----
#include "voip_connection.hh"
class SipObj; // Tried this in .hh file as well.
VoipConnection::voip_process_pdu(bool from_client)
{
SipObj sip;
sip.process(datap, &pdu_len);
}