The difference between #include <> and #include "" the

Source: https: //www.cnblogs.com/LeoFeng/p/5346530.html

 

一、#include< >

  #include <> reference the compiler library path inside the headers.

  If your compiler definition file references from the lead in the C: \ Keil \ c51 \ INC \ below the #include <stdio.h> references is C: \ Keil \ c51 \ INC \ stdio.h header file, regardless of What are your project directory, C: \ Keil \ c51 \ INC \ stdio.h decided on this path, generally referenced comes with some header files, such as: stdio.h, conio.h, string.h , stdlib.h and so on.

二、#include" "

  #include "" referenced in the header file is a relative path in your program directory.

  If your project directory is D: \ Projects \ tmp \, then #include "my.h" reference is D: \ Projects \ tmp \ my.h this header file, usually used to refer to some of the head to write their own file. If you use the #include "", it first looks in the current directory of your project if there is a corresponding header file, and if not, it will still referenced in the corresponding directory to find the corresponding header files. For example, use #include "stdio.h" If your project directory, there's no stdio.h header file, it will still navigate to C: \ Keil \ c51 \ INC \ stdio.h This header file.

Guess you like

Origin www.cnblogs.com/MCSFX/p/11298016.html