Difference

Hello. What is difference between #include "stdio.h" and #include <stdio.h> ?
Both are preprocessor directives. The preprocessor has two lists of directories to look for header files from.

The <> are presumed to be "system" headers. (Includes third-party libraries.)
The "" are presumed to be "project" headers.
As Kes says, they simply list two sets of places to look. The standard pretty much leaves it up to the implementation (and they could be exactly the same).

The standard dictates that #include<something> searches a sequence of implementation-defined places for the something (so it's up to your particular implementation), and #include "something" searches an implementation-defined place, and if it doesn't find it there, then goes looking in the other places as if it was a #include <something> .




Topic archived. No new replies allowed.