Posted On: Feb 22, 2018
The difference between these two is the location the compiler searches for the header file to be included. If the file name is enclosed in quotes, the compiler searches in the same directory in which the file is included. This method is normally used to include programmer defined headers. If the file name is enclosed in brackets which are used for standard library headers; the search is performed in an implementation dependent manner, normally through pre-designated directories. These both file inclusions one using angle brackets and the other using quotes in an include statement can be used in C and C++.
“path/myheaderfile.h” is short for ./path/myheaderfile.h
is short for /path/headerfile.h
Never Miss an Articles from us.