Hello..
I have 2 headers.
The first one is:
And the other one is:Code:#ifndef SESSION_HEADER #define SESSION_HEADER #include "header2.h" class session { public: session() { } thread *threads; thread *get_thread(unsigned short id); ..etc.. }; #endif
Code:#ifndef THREAD_HEADER #define THREAD_HEADER #include "header1.h" class thread { public: thread(session *se) { s = se; } session *s; thread *next; }; #endif
Now im getting errors when compiling, I think because the compiler wants to include header which would need the first header.. I know for extern, but is this the way how should I do it? And if I should, how would be the right way to do it?
Thanks for help guys