H File Documentation


Feature Value
File Extension .h
MIME Type text/plain
Format Type Text
Primary Association C, C++, and Objective-C Programming Languages
File Content Declarations for functions, types, variables, and classes
Encoding ASCII, UTF-8 (commonly)
Used In Software Development, Application Programming
Common Editors Visual Studio Code, Sublime Text, vim, emacs
Contain Source Code Yes, typically declarations
Support for Comments Yes, both single-line (//) and multi-line (/* ... */) comments
Include Mechanism #include directive
Preprocessor Support Yes
Macro Definitions Yes, with #define
Conditional Compilation Yes, using #ifdef, #ifndef, #if, #else, #elif, #endif
Pragma Directives Yes, using #pragma
Compatibility Highly compatible across various compilers
Commonly Included In C/C++/Objective-C source files (.c, .cpp, .m)
Header Guards Yes, to avoid double inclusion (#ifndef, #define, #endif)
External Library Declarations Common usage for declaring functions and types from external libraries
Compilation Requirement Not compiled directly; included in source files that are compiled
Typical Location Project's include directory or system's include path