对于这种问题先来看一看外国人怎么想的,因为本来这种语言就是他们创造的,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>时,编译器先从标准库路径开始搜索,如果没再搜索资源库目录,最好搜索当前工作目录。
#include<file.h>与#include"file.h"的区别
时间: 2025-01-21 14:56:24
#include<file.h>与#include"file.h"的区别的相关文章
&;quot;file&;quot;与&;quot;virtual&;quot;的区别
在编写ASP程序的时候,通常都会用到<!--#include virtual/file="path/filename"-->把一段相对独立的文件代码嵌套到当前页面中来.在实际的使用中很多人对"file"和"virtual"的使用不太理解,导致页面执行的时候会出现错误.现就该问题作一个简述. 使用"file"的时候,等号后面使用的是相对路径.所谓相对路径,是以当前文件所在的文件夹作为始点,通过路径搜索,得到其它文件(
js 获取、清空input type=&;quot;file&;quot;的值(示例代码)_javascript技巧
上传控件(<input type="file"/>)用于在客户端浏览并上传文件,用户选取的路径可以由value属性获取,但value属性是只读的,不能通过 javascript来赋值,这就使得不能通过value=""语句来清空它.很容易理解为什么只读,如果可以随意赋值的话,那么用户只要打开你的网页, 你就可以随心所欲的上传他电脑上的文件了. js 获取<intput type=file />的值 复制代码 代码如下: <html>
你好,我在项目里集成3.0的SDK,先是//#import &;amp;quot;ChatGroupDetailViewController.h&;amp;quot;报错
问题描述 你好,我在项目里集成3.0的SDK,先是//#import "ChatGroupDetailViewController.h"报错,每出现一个报错的头文件我就注释掉一个,连着去掉三四个之后出现十几个错误,没完没了了//#import "ChatGroupDetailViewController.h"//群组详情//#import "ChatroomDetailViewController.h"//聊天室#import "Cus
safari-MacBook的Safari下type=&;amp;quot;submit&;amp;quot;点击后显示不出div
问题描述 MacBook的Safari下type="submit"点击后显示不出div 如题,按钮点击的时候在window浏览器这个红色背景的div会一闪而过,但是在macbook的Safari中什么效果都没有,return false的时候div可以显示出来,但表单还怎么提交啊,return true时页面中div已经加载变成block了,感觉是还没来得及被浏览器渲染页面就刷新了一下,有没有什么办法可以让它有一闪而过的效果? html: <div id="divTes
java web-&;amp;lt;c:forEach items=&;amp;quot;${salesProducts }&;amp;quot; var=&;amp;quot;pro&;amp;quot;&;amp;gt;
问题描述 <c:forEach items="${salesProducts }" var="pro"> ${pro.goodsName}特价:¥${pro}/c:forEach pro的bean类属性都设了getter和setter方法,但是${pro.goodsName}没值,${pro}却有值 解决方案 检查一下goodsName属性名称有没写错. 解决方案二: private String goodsName;public String getG
jsp truts-&;amp;lt;div class=&;amp;quot;error_mes&;amp;quot;&;amp;gt;${message}&;amp;lt;/div&;amp;gt;
问题描述 <div class="error_mes">${message}</div> ${message}什么意思?${message}通常在哪实现? 解决方案 ${message}是java中el表达式 可以获取域中的值 四大作用域 application request session pageContext 建议百度看下el表达式就ok了 解决方案二: jsp中的EL表达式,具体看下这里面.http://blog.csdn.net/chinacshar
ajax-兄弟伙我的OnSuccess=&;amp;quot;afterLogin&;amp;quot;咋调用不起
问题描述 兄弟伙我的OnSuccess="afterLogin"咋调用不起 兄弟伙我的OnSuccess="afterLogin"咋调用不起,直接返回return Content类容到页面 @{ Layout = null; } <!DOCTYPE html> 网上超市管理系统 </p> <pre><code> //就是执行controller方法以后执行的方法 function afterLogin(data) {
jquery mobile中使用data-role=&;amp;quot;dialog&;amp;quot;弹出对话框的问题
问题描述 jquery mobile中使用data-role="dialog"弹出对话框的问题 如图,当页面除了一个"page"和"dialog"还有其它的 容器时,对话框后的背景就会显示没有样式的这个容器内容, 这是为什么呢,怎样才能让背景中不显示任何东西 解决方案 试试把背景内容放到另一个page中 你说的data-role =dialog 我没注意到 这个属性... 另外 可以看看 . data-role=popup http://www.
http-php 模拟提交 file按钮表单需要得到file的值
问题描述 php 模拟提交 file按钮表单需要得到file的值 'name' => string 'psuCARGLSPA-pola.jpg' (length=20) 'type' => string 'application/octet-stream' (length=24) 'tmp_name' => string 'E:wamp mpphpA6A6.tmp' (length=23) 'error' => int 0 'size' => int 268516 需要得到这