0
Header file
Apparently we can define the syntax of the header file in the following ways: #include <filename.h> #include "filename.h" or #include "filename" For user-defined header files, how come we cannot use the first format? Is it because angular brackets are explicitly used for the already built-in header files?
2 Answers
+ 2
Enclosing the header file name within angular brackets signifies that the header file is located in the standard folder of all other header files of C/C++. So the user defined header file it can be any place but the iostream or other slandered header file is in the slandered folder .So you can define it with angular bracket but not user defined header file.
0
We use .h extension with double quotation for user-defined header to differentiate between the third party headers and the compilers native headers.
Here's the order:
#include "myheader.h" // User-defined Header
#include <windows.h> // Third-party Header
#include <iostream> // Compilers native Header