When c++ includes header files, the difference between double quotes and angle brackets

#include "xxx.h"
First search for the corresponding file in the directory where the current file is located;
if not, go to the Include folder of the VC++ standard library to find the corresponding file.
You can use #include “xxx.h” whether you write it yourself or the header file provided by the standard library

#include <xxx.h>
The software will search according to the library environment variables configured by the system and the paths configured by the respective users.
Usually used to reference header files in the standard library.
If you use this method to find the header file we wrote yourself, it will report an error

The standard stipulates that angle brackets should be used when including standard header files or system header files provided by C++, and double quotation marks can be used when including custom header files. .

Guess you like

Origin blog.csdn.net/weixin_49035356/article/details/110917638