Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

main.h?

Status
Not open for further replies.

tunahead

Programmer
Feb 22, 2003
9
AT
what si the main.h for?
 
'main.h' is called a header file. It is like all other header files - basically it includes the code it contains into the code that calls the include directive. I wrote the function in an include file because it makes programs more readable and also you can include that code in another program. You could just not write an include file and instead copy what I wrote in the include(main.h) into the source code (main.c) at the point where I wrote the include directive (#include "main.h"), and if you do this delete the include directive as that "main.h" file is not needed.
I suggest you start using include files, but if you are not comfortable with them yet just do what I said above. Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top