When would you create a header file?
Im guessing its for storing functions you would use in more than 1 program?
When would you create a header file?
Im guessing its for storing functions you would use in more than 1 program?
It's for storing prototypes of functions and defining types and variables but they could also contain functions.
You can place anyanywhere. If it's something you'll use a lot then you could place it in your compilers include directory but they are usually placed in the same place as your source code.
according to me. more than header file.. i would call it include file. .. I usally do modular programing.. so I divide my problem into small chunks .. write separate code of it. check if it complies properly.. and finally include in my main program.
Yes what you said is also right if i want a perticular chunk of code in more than one program i would do the same.. !!
cheers.. hackernet