Solved

What are Head Files used in #include

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Magento Indexing 1 95
 shows up in Outlook, not OWA or on phone 3 69
JQuery tracking event. 3 66
Cordova Camera plugin fails 2 116
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

776 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