Originally Posted by
w4ck0z
Is it really necessary for each one of these cpp files to have its own header file for one single function declaration? it just seems a bit pointless to me..?
Also, how would I deal with global variables, having all these seperate files? where do they get declared?
1. I'm not positive, but, from downloading source code on this site, it seems to me like you have to include in every source file. I'm looking at one right now with three source files and they all have stdlib.h included.
Though, I believe all standard libraries contain a
Code:
#IFNDEF __WHATEVERTHISIS_H
#DEFINE __WHATEVERTHISIS_H
so I'm not sure if this is utilized when there are multiple source files.
2. Global Variables I would say should be delcared in a libary that you're gonna include in all the source files. Use Extern or whatever.
That's my two cents (count them... 1... 2) but then I'm a pretty new programmer, so don't let me be the final word.