Variable definition in header files
My very basic knowledge of C and compilation process has gone rusty lately. I was trying to figure out answer to the following question but I could not connect compilation, link and pre-processing phase basics. A quick search on the Google did not help much either. So, I decided to come to the ultimate source of knowledge :) I know: Variables should not be defined in the .h files. Its ok to declare them there. Why: Because a header file might get included from multiple places, thus redefining the variable more than one time (Linker gives the error). Possible work-around: Use header-guards in