include - Difference between .h files and .inc files in c -
i have been looking @ various open source projects, , have bunch of files written in c have .inc
file extension. far can tell, used header files.
i thought standard convention use .h
files header files , .c
source files. so, there standard convention on when header file should .inc
file rather being .h
file, or these decided @ per project basis? (or looking @ weird projects use .inc
?)
the standard convention use .h
header files contain macro definitions , other declarations , .c
c source files contain code , data definitions.
in projects, code fragments stored in separate files , included in c source files macro tricks expand in different files or circumstances. sometimes, these files included multiple times in same source file. underscore special semantics attached such files, giving them different extension may useful hint. these files may have been generated part of build process: naming them may prevent confusion actual source files.
look @ files came across in these projects , verify if explanation holds.
Comments
Post a Comment