I have the files console.h, cinput.h, and typedefs.h.
Console contains the declaration for my console class, console_t.
Cinput (console input) contains the declaration for the object i use to accept keyboard input to enter commands. right now, only console.h needs this file.
Console.h needs to include cinput.h so it can have its own input object.
Typedefs.h contains some externs for global variable access. it contains an extern'd console_t, so it needs to include console.h to know what a console_t is.
Cinput.h needs to include typedefs.h so it can access the extern'd console_t, so it can add to it with it's input function. here's my problem.
Console includes cinput, which includes typedefs, which includes console.
All my head files are surrounded in
and i figured that would help the problem, but i still get the errors:Code:#ifndef FILENAME_H #define FILENAME_H //stuff #endif
(6) \source\typedefs.h: In file included from source/typedefs.h
(7) \source\cinput.h: from source/cinput.h
(1) \source\cinput.cpp: from source/cinput.cpp
(21) \source\console.h: syntax error before `;'
if i don't include typedefs.h from cinput, i compile fine, but i'm unable to see the global console from there, which i want.