When I try to build my program, it tells me I have too many include files : depth = 1024. I have 14 .h files total. Is there a way to fix this without...deleting files?
Printable View
When I try to build my program, it tells me I have too many include files : depth = 1024. I have 14 .h files total. Is there a way to fix this without...deleting files?
Obviously 14 is less than 1024. Do you have a file that includes itself, or a pair of headers that include each other (such that you get an infinite circle of inclusions)?
Hmm...I have three classes that end up looping with inclusions. That much be the problem.
That's what include guards are for.
Code:#ifndef SOME_UNIQUE_STRING
#define SOME_UNIQUE_STRING
// Put your header code here.
#endif
GameDev.net - Organizing Code Files in C and C++
That link will help you out with your cyclic dependency problems