How do you like to set up your files with a header.h file?
I was told recently that having files use the same header.h file might cause conflicts if you do the following...
If you declare lets say int x; and make it globaly used among all files using that .h file.
int fightstart(int who, int player, int mob);
void display_bmp(char *file_name, int x2, int y2);
using namespace std;
... As you can see if I use this file amongst all my .cpp files it causes conflicts because there is multiple declarations of the same variables. As of wrighting this thread, I have came up with an idea and that is to make one headerfile that includes the predecessor files(I think thats what there called... the #include "bleh." and etc) and make one other that include only the variables needed for that .cpp file. Now before go to hell (work) and back (home), and try this out, I would like to ask this question... how do you (refering to anyone individualy) set up your program .c .cpp (or others that are similar) files with headerfiles. I was told that most real world programs use .h files, I'm not going to say all do, for that be ignorant of me as I know little of real world programs through the source, so I would like to know how you use .h files in your program, and make it function without the problem (or others that are not coming to my head)described above. Thank you all and I will answer any questions or clarify things (same thing as a question(?)) if needed.