Possible Duplicates:
Why does C++ need a separate header file?
In C++ why have header files and cpp files?
Hi geeks,
I have been using header files for almost everyday. It's kind of an instinct to me now. Suddenly, I ask myself, What on earth do we include a header file for?
Currently, I think of the following reason:
The header file is the only source of clue for the compiler to generate the proper code to push the parameters of a certain method onto the stack. And thus is the invoking of that method is possible. The invoking action could be resolved by the linker at load time or run time, but the preparation instructions (i.e. parameter pushing) must be generated by the compiler at compile time.
Thanks for correcting me.