Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

What are Head Files used in #include

Posted on 2000-02-17
1
Medium Priority
?
195 Views
Last Modified: 2013-11-18
I have programming a little with C but have more knowlege with Pascal.

What it confused me is the head files usind in #include. When looking at them directly with the editor, seems like they are C language, not compiled libraries. That's why it confuses me...

For example the printf() is defined at the head file, but is that C language? Is it possible to change the definition to add more funtionality on it?

I think it is something like Uses clause at Pascal, but the Pascal libraries (obj) are compiled with assembly, C or even Pascal...

What about C? The libraries are not compiled at all and it is hard to understand them.

Thanks.
0
Comment
Question by:hongsikchoi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
snifong earned 40 total points
ID: 2533699
header files (*.h) files contain the declarations of the functions and variables.  They are not object files or compiled libraries.  The .c or .cpp files contain the function definitions.  The c or cpp files compile into the .obj that you were talking about.
Yes. printf() is C language.  It is not possible to add more functionality to it in that file because you only have the header file ( the declaration ) and not the c or cpp file.  It would be better to write your own printf function instead of trying to modify that one.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question