"forward declaration" compiling error

muby99
Unregistered
 
Post: #1
hi all,
Im compiling this code for wireless network gaming, but after i run 'make' i get this error

Quote:node-common/ll-arp.o node-common/ll-arp.cc
./80211/net-interface-80211.h:59: error: invalid use of undefined type ‘struct NetInterface’
node-common/ll-arp.h:49: error: forward declaration of ‘struct NetInterface’
./80211/net-interface-80211.h:107: error: invalid use of undefined type ‘struct NetInterfaceConstructor’
./node-common/net-node.h:52: error: forward declaration of ‘struct NetInterfaceConstructor’

the class called in net-interface-80211.h is

Quote:class NetInterface80211 : public NetInterface {
public:
virtual ~NetInterface80211 ();

int getBSSID (void);

what should i do?

thank you
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #2
You need to #include the header that defines NetInterface. If it's in the same file, you need to make sure it appears before you declare NetInterface80211.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  c++ forward declaration question gradyeightythree 7 10,869 Apr 14, 2007 04:12 PM
Last Post: gradyeightythree