The difference depends on the compiler you are using. Some compilers treat them the same, while others don't. With vc++ the <> tells the compiler to only look in its standard include directories (there are options to add to the list of directories), while the "" tells the compiler to first look in the program's source directory, it the header file is not there then the compiler will look in its standard directories just as if you had used <>.
I think google made a recent change to its search algorithms because some things seem to be more difficult to find than previously.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Using quotes ("blah") instead of angle-brackets (<blah>) changes the compiler's behavior while it searches for the #included file.
Using quotes makes the compiler look in the source file's local directory, then the default include directory. Using angle-brackets makes the compiler go directly to the default include directory and ignore the local directory when it searches.
Basically, if you're writing a custom header, you should use quotes (i.e. "myClass.h") and use brackets for any standard headers (i.e. , , etc.).
See this.
EDIT:
Oops, AD beat me to it.
Fbody
Posting Maven
2,930 posts since Oct 2009
Reputation Points: 833
Solved Threads: 393
The standard says that angle brackets cause the compiler to look in an implementation-defined location and double quotes cause the compiler to look in an implementation-defined location. I can see how there might be confusion. ;)
Traditionally the angle brackets searched the compiler's include locations followed by local directories, while double quotes did the opposite. Best practice has been to use angle brackets for compiler provided headers and double quotes for everything else.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401