none
VS2010里面用向导添加的代码文件, 只能用#include "xxx.h" 而不能用c++标准的尖括号... RRS feed

  • 问题


  •    VS2010里面用向导添加的代码文件, 只能用引号#include "xxx.h" 而不能用c++标准的尖括号...
       用尖括号就不认得了.

       有朋友遇到跟我一样的问题的么?
       是因为我给IDE装了插件的原因么?

    2012年1月30日 8:26

答案

  • #include <...>则先去系统目录中找头文件,如果没有在到当前目录下找。
    #include "..."则首先在当前目录下寻找,如果找不到,再到系统目录中寻找。

    • The #include <...> method of file inclusion is often used to include standard headers such as stdio.h or stdlib.h. This is because these headers are rarely (if ever) modified, and they should always be read from your compiler&rsquo;s standard include file directory.
    • The #include "..." method of file inclusion is often used to include nonstandard header files that you have created for use in your program. This is because these headers are often modified in the current directory, and you will want the preprocessor to use your newly modified version of the header rather than the older, unmodified version.
    2012年1月30日 10:26
    版主

全部回复

  • #include <...>则先去系统目录中找头文件,如果没有在到当前目录下找。
    #include "..."则首先在当前目录下寻找,如果找不到,再到系统目录中寻找。

    • The #include <...> method of file inclusion is often used to include standard headers such as stdio.h or stdlib.h. This is because these headers are rarely (if ever) modified, and they should always be read from your compiler&rsquo;s standard include file directory.
    • The #include "..." method of file inclusion is often used to include nonstandard header files that you have created for use in your program. This is because these headers are often modified in the current directory, and you will want the preprocessor to use your newly modified version of the header rather than the older, unmodified version.
    2012年1月30日 10:26
    版主
  • 哎...   估计这又算神马神马"特性"...

    2012年1月30日 12:45