0 votes
in C Plus Plus by
What is the difference between #include "..." and #include <...>?

1 Answer

0 votes
by
In practice, the difference is in the location where the preprocessor searches for the included file.

For #include <filename> the C preprocessor looks for the filename in the predefined list of system directories first and then to the directories told by the user(we can use -I option to add directories to the mentioned predefined list).

For #include "filename" the preprocessor searches first in the same directory as the file containing the directive, and then follows the search path used for the #include <filename> form. This method is normally used to include programmer-defined header files.

Related questions

0 votes
asked Jan 9 in C Plus Plus by GeorgeBell
0 votes
asked Jan 4 in C Plus Plus by GeorgeBell
...