编写#import< filename.h>的区别和#import"filename.h"即将文件名写在尖括号和引号中? [英] Difference between writing #import <filename.h> and #import "filename.h" i.e written the file name in angular brackets and quotes?
问题描述
写#import和#import"filename.h"之间的区别,即在尖括号和引号中写文件名吗?
带引号的格式该格式指示预处理程序在包含#include语句的文件的同一目录中,然后在任意目录的目录中查找include文件.包含(#include)该文件的文件.然后,预处理器将沿着/I编译器选项指定的路径进行搜索,然后沿着INCLUDE环境变量指定的路径进行搜索.
尖括号形式该形式指示预处理器首先沿着/I编译器选项指定的路径搜索包含文件,然后在从命令行进行编译时沿着INCLUDE环境变量指定的路径搜索包含文件.>
Possible Duplicate:
what is the difference between #include <filename> and #include “filename”
Difference between writing #import and #import "filename.h" i.e written the file name in angular brackets and quotes?
Quoted form This form instructs the preprocessor to look for include files in the same directory of the file that contains the #include statement, and then in the directories of any files that include (#include) that file. The preprocessor then searches along the path specified by the /I compiler option, then along paths specified by the INCLUDE environment variable.
Angle-bracket form This form instructs the preprocessor to search for include files first along the path specified by the /I compiler option, then, when compiling from the command line, along the path specified by the INCLUDE environment variable.
Source http://msdn.microsoft.com
这篇关于编写#import< filename.h>的区别和#import"filename.h"即将文件名写在尖括号和引号中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!