.h file is the header file of C language and [C] language. Generally, only function declarations, macro definitions, and function prototypes are placed in the [.h] class header file, and the specific implementation is in [ .cpp] file.
The operating environment of this tutorial: windows7 system, c99 version, Dell G3 computer.
.h
is the header file of C language and C language.
Functions are as follows:
1. Generally, only function declarations, macro definitions, and function prototypes are placed in the header file of the .h
class, and the specific implementation is in .cpp
file;
2. Example: For example, the mathematical functions seen in <math.h>
are only declared, and the specific implementation is in <math.cpp>
inside;
3. During compilation, the compiler will automatically load the .CPP
file that matches .h
.
Related introduction:
C language is a process-oriented computer programming language, which is different from object-oriented programming languages such as C, C#, and Java. The design goal of the C language is to provide a programming language that can be easily compiled, handle low-level memory, generate only a small amount of machine code, and can run without any runtime environment support. C language describes problems faster than assembly language, has less workload, good readability, and is easy to debug, modify and transplant, while the code quality is equivalent to assembly language. C language is generally only 10%-20% less efficient than the target program generated by assembly language code. Therefore, C language can write system software.
At the current stage, in the field of programming, C language is widely used. It takes into account the advantages of high-level language and assembly language and has greater advantages than other programming languages. Computer system design and application programming are the two major areas of C language application. At the same time, the C language is highly universal and can be applied in many computer operating systems with remarkable efficiency.
C language has a complete theoretical system that has gone through a long history of development and plays a decisive role in programming languages.
Related free learning recommendations: php programming (video)
The above is the detailed content of What is a .h file?. For more information, please follow other related articles on the PHP Chinese website!