Solved

What are Head Files used in #include

Posted on 2000-02-17
1
189 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 20 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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Field that has HTML displays the code instead of the text in html 16 122
Problem to echo 6 117
IIS Log files on Exchange 2013 server 6 331
Grunt Copy file to another destination. 1 95
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

734 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