c++ - How do I include header file -
i have packet class , packetfactory class.
in packet factory class includes packet.h file , in packet class includes packetfacotry.h file.
then getting error "packet not name type " in packetfactory.h file.
how fix this?
thanks in advance.
2 ways :
first, can #include "packet.h"
in packetfacotry , #include "packetfacotry.h"
. not forget protect headers.
second, if have circular inclusion juste add class packet;
in "packetfacotry.h. file or vice versa. declares symbols preprocessor.
so ?
Comments
Post a Comment