Possible Duplicate:
What is the difference between #include <filename> and #include “filename”?
When I written my programs, I include libraries like #include <iostream> . but also #include "iostream" is correct and the code would compiled without any error or problem.
So, I’m wondering what’s the difference between < > and " " ?
When you use
< >, the compiler only looks in the system-designated directory/directories (e.g., whatever you’ve set in theincludeenvironment variable) for the header.When you use
" ", the compiler looks in the local directory first, and if that fails, re-searches just like you’d used< >. Technically, (i.e., according to the standard) that doesn’t have to be the “local” directory, but that’s how it works in essentially every compiler of which I’m aware).In case you care, the official wording from the standard is actually kind of vague (§16.2/2-3):