when programming in C language, it is very attractive to find details. A more detailed look at a bit about the knowledge of include, found a few things:
1.include< header file name > and include "header file name"
such as:include<stdio.h> and include "Stdio.h"
The former (using <>), to refer to the Stdio.h file, is to first retrieve the standard path to see if there is a header file under these folders, and if not, it will not retrieve the current file path, and will error.
The latter (using ""), to refer to the Stdio.h file, is the first to retrieve the current path of the file, and if not, retrieve the standard path to see if there is a header file under those folders.
2.linux, the above standard path is:/usr/include,/usr/local/include.
3.<sys/header file name >. such as <sys/io.h>,<net/ethernet.h> and so on. where the preceding string (such as Sys,net) represents the folder name under the standard path, followed by a string (such as io.h,ethernet.h) that represents the header file name under each folder under the Linux standard path, such as the io.h file under the Sys folder, which we can/usr/ IO.h file found in the Include/sys directory.
Linux is profound and needs to accumulate slowly.
4. If you want to retrieve the header file under the specified path, you can add option-I. As in my/home/desktop directory, there is a header file Local1.h, which is available when compiling test.c files containing local1.h: gcc test.c-o test-i/root/desktop.
Linux under C programming, include default search path