Here is the code....at a very nascent stage.
Code:
class net_device
{
protected:
bool send(net_device&,packet);
std::deque<pack_dev_map> send_buffer;
std::deque<pack_dev_map> recv_buffer;
public:
static bool connect(net_device,net_device);
};
//********/
class packet
{
private:
std::string main_data;
//packet headers go here..
public:
std::string get_main_data();
packet(std::string);
//packet(packet&)
};
packet::packet(std::string data_arg)
{
main_data = data_arg;
}
std::string packet::get_main_data()
{
return main_data;
}
//*********/
class pack_dev_map //packet-device sets...did not use std::map
{
public:
packet p;
net_device* n;
pack_dev_map(packet&,net_device&);
};
pack_dev_map::pack_dev_map(packet& p_arg,net_device& n_arg)
{
p = p_arg;
n = &n_arg;
}
The bold lines show an error that packet:: packet() is not defined. It is not, but why does it need it ?
[also..to the moderators who may see this, I can't find a way to change the - now invalid- title of the post, can you do that?]