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?
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
"I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008
"the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010
GameDev.net - Organizing Code Files in C and C++
That link will help you out with your cyclic dependency problems