vc++中,#include有两种形式:
[url]http://msdn.microsoft.com/en-US/library/36k2cdd4%28v=VS.80%29.aspx
[/url]
The #include directive tells the preprocessor to treat the contents of a specified file as if those contents had appeared in the source program at the point where the directive appears.
[quote]
#include "path-spec"
#include <path-spec>
[/quote]
[quote]Quoted form(引号)
总共四个地方
This form instructs the preprocessor to look for include files in the same [b]directory of the file that contains the #include statement[/b], and then in the [b]directories of any files that include (#include) that file[/b]. The preprocessor then searches along [b]the path specified by the /I compiler option[/b], then along [b]paths specified by the INCLUDE environment variable[/b].[/quote]
[quote]
Angle-bracket form(尖括号)
两个地方
This form instructs the preprocessor to search for include files first along [b]the path specified by the /I compiler option[/b], then, when compiling from the command line, along the path specified by [b]the INCLUDE environment variable[/b].
[/quote]
至于[b]the path specified by the /I compiler option[/b],可以通过
配置属性-》c、c++-》命令行 中看到有哪些
[url]http://msdn.microsoft.com/en-US/library/36k2cdd4%28v=VS.80%29.aspx
[/url]
The #include directive tells the preprocessor to treat the contents of a specified file as if those contents had appeared in the source program at the point where the directive appears.
[quote]
#include "path-spec"
#include <path-spec>
[/quote]
[quote]Quoted form(引号)
总共四个地方
This form instructs the preprocessor to look for include files in the same [b]directory of the file that contains the #include statement[/b], and then in the [b]directories of any files that include (#include) that file[/b]. The preprocessor then searches along [b]the path specified by the /I compiler option[/b], then along [b]paths specified by the INCLUDE environment variable[/b].[/quote]
[quote]
Angle-bracket form(尖括号)
两个地方
This form instructs the preprocessor to search for include files first along [b]the path specified by the /I compiler option[/b], then, when compiling from the command line, along the path specified by [b]the INCLUDE environment variable[/b].
[/quote]
至于[b]the path specified by the /I compiler option[/b],可以通过
配置属性-》c、c++-》命令行 中看到有哪些