对于这种问题先来看一看外国人怎么想的,因为本来这种语言就是他们创造的,http://www.geekinterview.com/question_details/3379
 
 
What is the difference between #include <file> and #include “file”?
When writing your C program, you can include files in two ways. The first way is to surround the file you want to include with the angled brackets < and >. This method of inclusion tells the preprocessor to look for the file in the predefined default location. This predefined default location is often an INCLUDE environment variable that denotes the path to your include files. For instance, given the INCLUDE variable
INCLUDE=C:COMPILERINCLUDE;S:SOURCEHEADERS;
using the #include <file> version of file inclusion, the compiler first checks the C:COMPILERINCLUDE
directory for the specified file. If the file is not found there, the compiler then checks the
S:SOURCEHEADERS directory. If the file is still not found, the preprocessor checks the current directory.
 
The second way to include files is to surround the file you want to include with double quotation marks. This
method of inclusion tells the preprocessor to look for the file in the current directory first, then look for it in the predefined locations you have set up. Using the #include “file” version of file inclusion and applying
it to the preceding example, the preprocessor first checks the current directory for the specified file. If the
file is not found in the current directory, the C:COMPILERINCLUDE directory is searched. If the file
is still not found, the preprocessor checks the S:SOURCEHEADERS directory.
The #include <file> 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’s standard include file directory. 
The #include “file” 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.
 
 
 
总的来说:
当用#include“file.h”时,先搜索当前工作目录,如果没有,再去搜索库,库没有再搜索资源库;
当用#include<file.h>时,编译器先从标准库路径开始搜索,如果没再搜索资源库目录,最好搜索当前工作目录。

#includefile.h与#includefile.h的区别相关推荐

  1. 每日一题(13)—— #includefile.h 与 #include “file”的区别

    #include<file.h> 与 #include "file"的区别? #include<file.h>:编译器从标准库路径开始搜索file.h: # ...

  2. C语言stdio.h与stdlib.h的区别

    一.定位不同 1.stdlib.h是standard library标准库头文件,定位在通用工具函数. 2.stdio.h是standard input&output标准输入输出头文件,定位在 ...

  3. Windows.h和windows.h的区别

    在C++中有这样两个头文件就像双胞胎一样,它们分别是 #include<Windows.h> #include<windows.h> 这两个函数有什么区别呢,一下为我的见解.有 ...

  4. df -h和df -lh的区别

    df -h和df -lh的区别 Linux查看文件命令,df -lh只查看本地空间的存储情况,df -h查看所有文件空间的存储情况,如果有连接远程存储,也可以查看到. 推荐使用 df -h.

  5. MPEG-4、MPEG-4/AVC、H.264、H.265之间的联系与区别

    1.H.264与MPEG的关联在视频编解码技术定义方面有两大标准机构.一个是国际电信联盟 (ITU) 致力于电信应用,已经开发了用于低比特率视频电话的 H.26x 标准,其中包括 H.261.H.26 ...

  6. 视频编码器h.264和mpeg4的区别?

    MPEG-4编码技术 MPEG-4:MPEG-4是一个适用于低传输速率应用的方案,MPEG-4是在MPEG-1.MPEG-2基础上发展而来,是为了播放流式媒体的高质量视频而专门设计的,它可利用很窄的带 ...

  7. ll -h和du -sh的区别

    今天服务器上搜集日志 filebeat报错内存溢出 上服务器发现了奇怪的现象.日志文件大小显示不一致 报错如下 2019-12-12T11:49:50.417+0800  INFO      inpu ...

  8. H.265与H.264的区别详解

    1.H.264与H.265的主要差异 H.265仍然采用混合编解码,编解码结构域H.264基本一致, 主要的不同在于: Ø 编码块划分结构:采用CU (CodingUnit).PU(Predictio ...

  9. lwip【4】 lwIP配置文件opt.h和lwipopts.h初步分析之一

    在这里先说一下这两个配置lwip协议栈文件opt.h和lwipopts.h的关系:          opt.h是lwip"出厂"时原装的配置文件,它的作者是瑞士科学院的Adam等 ...

  10. iOS音视频开发八:视频编码,H.264 和 H.265 都支持

    我们将通过拆解采集 → 编码 → 封装 → 解封装 → 解码 → 渲染流程并实现 Demo 来向大家介绍如何在 iOS/Android 平台上手音视频开发. 这里是第八篇:iOS 视频编码 Demo. ...

最新文章

  1. CSS3的过渡和动画
  2. 基于WeUI的Angular2开发
  3. SharePoint2013 访问“/”应用程序中的服务器错误。解决方案:
  4. AWS — AWS 上的 5G 网络及 MEC 边缘计算商业案例
  5. python实用脚本-python 实用脚本
  6. leetcode - 813. 最大平均值和的分组
  7. Linux常用命令—文件处理命令—链接命令
  8. 多语言网站解决方案 v2.00
  9. 盐城大数据产业园人才公寓_盐城市大数据产业园获评大众创业万众创新示范基地...
  10. go语言--竞争、原子函数、互斥锁
  11. mysql实际是用命令还是图形化_那些你不常用却非常有用的MySql语句和命令
  12. sparksql 保存点_Spark SQL笔记整理(三):加载保存功能与Spark SQL函数
  13. RTMP直播推流Video(视频)
  14. 极域教室管理软件全屏广播窗口化,解除网络限制,阻止老师监控进程,阻止黑屏安静,强制杀死极域进程等
  15. e签宝:借助钉钉宜搭变革传统项目管理模式,交付效率显著提升
  16. 知识付费资源变现小程序源码+可开流量主/带教程
  17. 百度地图自定义图标不显示问题解决方案
  18. 扇贝python课程打卡_Learning by doing——百日“扇贝打卡” 历程展望
  19. 无线linux应用及配置--wifi配置
  20. net—card seting monitor mood

热门文章

  1. python获取小数部分
  2. 2019.07.一年级暑假——自动随机生成100以内加减法算术题的python实现
  3. oracle 启用job,Oracle job启动与关闭
  4. 【工具】D2RQ安装和配置
  5. 设计模式--工厂模式(一个关于工厂的故事)
  6. learn git branching学习整理
  7. 你是我的眼:水哥王昱珩带你重新打量这世界
  8. 【跨境电商平台】Magento VS Shopify,选谁进行独立站建站?
  9. Dream(励志英文演讲)
  10. Kafka集群的安装和使用