#include <Header.h> is not compiling while #include "Header.h" is compiling
Don't understand why
#include &开发者_StackOverflow社区lt;Header.h>
is not compiling while #include "Header.h"
is compiling with Visual Studio 2008. Am I missing something?
The two forms of #include
search for headers differently.
You can find which paths are searched for each form in the #include
MSDN documentation.
They have different purposes.
The brackets <
and >
are for standard header files, while the quotes "
are for your header files.
Here is another question with more information regarding this:
What is the difference between #include <filename> and #include "filename"?
when you mention header file <>, it looks in standard includes, but when header file is included with "", starts with current directory,then will look at standard includes. Here, in this case, Header.h is in current directory, may not be in standard includes.
精彩评论