Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

2.6. Header Files

Keeping track of function declarations can get messy, for this reason Header files are used to house C code that you wish to appear in multiple files. You have actually already used a header file. stdio.h is a header file which contains many function declarations, it contains the function declarations for printf() and printf(). Once you have placed the function declarations you wish to share into a header file you can #include your header in each C file that needs the information. The only difference being that you surround your filename in quotes instead of angle brackets ("my_header.h" instead of <system_header.h>). To illustrate these points we'll write that pizza program I mentioned earlier.

 
 
  Published under the terms of the GNU General Public License Design by Interspire