ProAnswers.org

Difference between #include <filename> and #include “filename”

#include
#include “filename”

1 Like

The difference between these two is the location the preprocessor searches for the file to be included.

#include “filename”

If the file name is enclosed in quotes, the preprocessor searches in the same directory as the file being compiled for the file to be included. This method is normally used to include programmer defined headers.

#include

If the file name is enclosed in brackets - used for standard library headers - the search is performed in an implementation dependent manner, normally through predesignated directories.