⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_61326.htm

📁 vc
💻 HTM
字号:
<p>
序号:61326 发表者:rhj888 发表日期:2003-11-19 10:31:45
<br>主题:#pragma XXXX是什么意思呀?
<br>内容:#pragma XXXX是什么意思呀?
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:浪际天涯 回复日期:2003-11-19 10:47:44
<br>内容:表示给编译器一个编译的指示,如何去编译其后的代码,例如:<BR>#pragma once指示编译器在编译时,该文件中其后的代码在整个构建过程中只编译一次
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:rhj888 回复日期:2003-11-19 10:55:34
<br>内容:那么#pragma hdrstop又是什么意思?
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:浪际天涯 回复日期:2003-11-19 11:23:03
<br>内容:这个我也没用过,你可以看一下MSDN上的解释,我看了一下,英文不行,所以看得不太懂<BR>大概是说它是用来控制编译头文件工作,一般情况下是不被理睬的,除非你指定了/YX or /Yc,当程序编译到这里时将保存一个编译状态,在以后已经保存到编译状态里的代码将不会被保存。<BR><BR>申明:我英文很差,上面说的是胡说八道,个人理解,大家不要笑我,也不要仍飞刀呀<BR><BR>hdrstop<BR>#pragma hdrstop [( &#34;filename&#34; )]&nbsp;&nbsp;<BR><BR>Controls the way precompiled headers work. The filename is the name of the precompiled header file to use or create (depending on whether /Yu or /Yc is specified). If filename does not contain a path specification, the precompiled header file is assumed to be in the same directory as the source file. Any filename is ignored when /YX, the automatic precompiled header option, is specified. <BR><BR>If a C or C++ file contains a hdrstop pragma when compiled with either /YX or /Yc, the compiler saves the state of the compilation up to the location of the pragma. The compiled state of any code that follows the pragma is not saved. <BR><BR>The hdrstop pragma cannot occur inside a header file. It must occur in the source file at the file level; that is, it cannot occur within any data or function declaration or definition.<BR><BR>Note&nbsp;&nbsp; The hdrstop pragma is ignored unless either the /YX option is specified or the /Yu or /Yc option is specified without a filename.<BR><BR>Use filename to name the precompiled header file in which the compiled state is saved. A space between hdrstop and filename is optional. The filename specified in the hdrstop pragma is a string and is therefore subject to the constraints of any C or C++ string. In particular, you must enclose it in quotation marks as shown in the following example:<BR><BR>#pragma hdrstop( &#34;c:\projects\include\myinc.pch&#34; )<BR><BR>The name of the precompiled header file is determined according to the following rules, in order of precedence: <BR><BR>The argument to the /Fp compiler option<BR><BR><BR>The filename argument to #pragma hdrstop<BR><BR><BR>The base name of the source file with a .PCH extension 
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -