C/C ++ header file reference
Include <> reference the header file in the compiler's class library path
Include "" refers to the header file of the relative path of the project directory
Include is a Compilation instruction. during compilation, the compiler will replace the relative path with the absolute path. Therefore, the absolute path of the header file = search path + relative path.
Search paths setting search path under xcode build settings
Header search paths: header file search path settings
$ (Srcroot) macro and $ (project_dir) macro both indicate the parent directory of XXX. xcodeproj.
For example, reference the header file testdemo/scr/test. H of the project,
Add $ (srcroot) to header search paths and reference it as include "SCR/test. H"
If $ (srcroot)/SCR is added to the header search paths, the header file references include "test. H" directly"
If always search user paths is set to yes, the compiler first searches for the directory in the user header search paths path. In this case, include <string. h>, the files in the user header search Paths Search directory will overwrite the system's header files.