When using include to quote header files, the difference between " "
and < >
:
" "
: To quote the header file of a non-standard library, the compiler first searches in the directory where the program source file is located. If it is not found, it goes to the system default directory to search, usually used to quote user-defined header files.
< >
: search only in the system default directory or the path in angle brackets.It is usually used to reference the header files that come with the standard library.
In summary, the header files that come with the standard library can use " "
or < >
, but we are used to using < >
, and user-defined header files can only use " "
.
However, you could add the directory path where file.h
is located in Properties->VC++ Directories->Include Directories
.

In general, using " "
for self-written, and < >
for header files of the third-party libraries or system libraries.