Header files are necessary to declare any classes or functions that you will be using in your program. Without them, you would have to write your own base code to handle simple things like reading a file from the hard drive. Any compiler would need the header files for the functionality you are using, or else they would not know what any of the function calls you use actually mean.
Kernel compilers do not require header files, but anyone who knows enough to be working with a kernel compiler would not be asking this question on Yahoo Answers.
2007-02-19 16:04:24
·
answer #1
·
answered by Rex M 6
·
1⤊
1⤋
There isn't any need to include header files. Just manually declare and define all constants and inlines as needed. Of course, that would be a real pain, for which the solution would be... headers.
2007-02-20 01:02:35
·
answer #2
·
answered by csanon 6
·
1⤊
0⤋
No. There is a good reason header files are needed.
Header files allow you to include only the code segments you need to make your program work, without introducing extra code that you do not need, thus bloating the compile.
2007-02-20 00:03:51
·
answer #3
·
answered by Amanda H 6
·
1⤊
1⤋
yes. the GCC compilers all are able to do that with a couple of command line options. In fact, gcc is used to write operating systems like the Linux kernel, which cannot make use of header files because it is a kernel.
2007-02-20 00:06:53
·
answer #4
·
answered by iammisc 5
·
0⤊
2⤋