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

📄 subject_64559.htm

📁 vc
💻 HTM
字号:
<p>
序号:64559 发表者:王小锋 发表日期:2003-12-11 13:51:29
<br>主题:各位大侠,请教一个问题#pragma
<br>内容:各位大侠,请教一个问题,#pragma到底有什么用途,能不能提供有关这方面的资料啊<BR>#pragma hdrstop<BR>
<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-12-11 22:42:07
<br>内容:昨天说的不对,具体内容你可以参考MSDN的解释,以下是我从MSDN转贴过来的<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><BR>2003-12-12 9:21:31

⌨️ 快捷键说明

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