Solved

What are Head Files used in #include

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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

623 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