Possible Duplicate:
What is the difference between #include <filename> and #include “filename”?
Why doesn’t the compiler complain when I write the following:
#include "stdio.h"
Shouldn’t it be
#include <stdio.h>
instead, because stdio.h is actually stored in a library folder and not in the folder of the translation unit? Why does it work anyway?
The difference between
""and<>isn’t much. Both search for the header in implementation-defined places1, 2. The difference is that if that search fails for"", the search happens as if it was using<>. (§16.2)Basically, this means that if
<>finds a header with a certain name,""does not fail to find a header with the same name3.1 These implementation-defined places do not have to be the same for both forms.
2 There is no requirement that one of these search library folders and the other search the folder of the TU. The compiler is allowed to search the whole filesystem and even google for it if it wants.
3 This does not mean that they always find the same header, though.