#include madness

Started by
0 comments, last by Fruny 18 years, 1 month ago
Hello there! I´m coding a game and have already lots of files with a huge number of linking between them.The problem is,it is reaching a point in which the compiler keeps saying I am redefining stuff when including one file to the other.I have one huge file for typedefs,another huge file for global variables,and these are the ones that give me the biggest problems,because,of course,if I have a class named X which depends on class Y and both need to access the ClassesTypedefs file,then there will be multiple definition. Well...should I just think over my way of organizing these things or is there a way of creating a 'global file' in which all #include´s are included? Thanks a bunch, Carol
Advertisement
Read this.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan

This topic is closed to new replies.

Advertisement