Home >Backend Development >C++ >C Header Files: Angle Brackets vs. Double Quotes – When to Use Which?
#include Directive: Angle Brackets (< >) vs. Double Quotes (" ")
When including header files in C , you have the option of using either angle brackets (< >) or double quotes (" ") to specify the file's location. This choice has implications depending on the compiler and the location of the header file.
Angle Brackets (< >)
Double Quotes (" ")
Summary
In general, it is recommended to use angle brackets (< >) to include system headers and double quotes (" ") to include headers located in your own project or in the current working directory. The choice between angle brackets and double quotes can also influence the order in which the compiler searches for header files.
The above is the detailed content of C Header Files: Angle Brackets vs. Double Quotes – When to Use Which?. For more information, please follow other related articles on the PHP Chinese website!