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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -