Sunday, 2 February 2014

What is the difference between #include and #include “filename”?

The difference is in the location where the preprocessor searches for the included file.
For #include "filename" the preprocessor searches in the same directory as the file containing the directive. This method is normally used to include programmer-defined header files.
For #include <filename> the preprocessor searches in an implementation dependent manner, normally in directories pre-designated by the compiler. This method is normally used to include standard library header files.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More