Twitter Feed

Tuesday, August 19, 2008

#include

The #include directive causes a copy of a specified file to be included in the place of the directive. The two forms of the #include directive are:
  • #include <filename>
  • #include "filename"
The difference between these two is the location the preprocessor searches for the file to be included. 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. 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.

No comments: