CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  C/C++ >  C语言

以前从来没有看到过这个,请问这一句是什么意思#pragma a

楼主bobshi(JAVA&C++)2003-04-02 21:34:51 在 C/C++ / C语言 提问

如上。 问题点数:20、回复次数:10Top

1 楼Cybergate()回复于 2003-04-02 21:54:41 得分 3

好像没这个东西,至少vc7里没有Top

2 楼alan118(The Server Side)回复于 2003-04-02 22:57:02 得分 2

我在vc6里看到过,不过也不知道是什么。upTop

3 楼chengdulang(CD哑)回复于 2003-04-03 08:53:04 得分 5

#pragam   是宏指令  
   
  用法     #pragma   名字  
   
  如果是在tc中有2个名字可用  
   
  1       #pragma   inline     表示程序内含inline汇编玛。  
   
  2       #pragma   warn   该宏指令与许可编译任选项-wxxx所指定的xxx相同,但由于#pragma   warn   所指定的xxx优先。  
   
  Top

4 楼comptometer(valor)回复于 2003-04-03 09:19:17 得分 5

msdn的解释:  
  Each   implementation   of   C   and   C++   supports   some   features   unique   to   its   host   machine   or   operating   system.   Some   programs,   for   instance,   need   to   exercise   precise   control   over   the   memory   areas   where   data   is   placed   or   to   control   the   way   certain   functions   receive   parameters.   The   #pragma   directives   offer   a   way   for   each   compiler   to   offer   machine-   and   operating-system-specific   features   while   retaining   overall   compatibility   with   the   C   and   C++   languages.   Pragmas   are   machine-   or   operating-system-specific   by   definition,   and   are   usually   different   for   every   compiler.  
   
  Top

5 楼liuheliaoshi7879(虾米)回复于 2003-04-03 10:36:51 得分 0

学 习Top

6 楼robertnet(大师兄)回复于 2003-04-03 11:00:57 得分 0

#pragam   是宏指令,现在一般都不用了。Top

7 楼BlueSky2008(懒惰是程序员的美德)回复于 2003-04-03 11:21:54 得分 2

#pragam   是宏指令.用与在编译时控制编译器行为.现在仍广泛使用.  
  如win32   及MFC   application   wizard   生成的stdafx.h文件中,就有一句:  
  #progra   once  
  表示此文件只编译一次.Top

8 楼woxihuanbohe(我喜欢)回复于 2003-04-03 12:53:28 得分 1

#progra   inline     表示编译器将支持内联!!????Top

9 楼DanielWYO(爱上小白)回复于 2003-04-03 13:42:54 得分 1

在MSDN中用pragma查找看看就知道了.  
   
  另外说明,#pragma的实现由编译器自己定义,所以每个编译器都有所不同.  
  要知道别的编译器的情况,请查阅各自的helpTop

10 楼DanielWYO(爱上小白)回复于 2003-04-03 13:47:25 得分 1

alloc_text    
  comment    
  init_seg1    
  optimize    
  auto_inline    
  component    
  inline_depth    
  pack    
  bss_seg    
  data_seg    
  inline_recursion    
  pointers_to_members1    
  check_stack    
  function    
  intrinsic    
  setlocale    
  code_seg    
  hdrstop    
  message    
  vtordisp1    
  const_seg    
  include_alias    
  once    
  warning    
   
  以上是VC6.0中的支持的#pragma  
   
   
   
  to   robertnet(三极管)   :  
  "#pragam   是宏指令,现在一般都不用了"  
  真的吗??  
  //-------------------------------------------------------------------------------  
  很多语言中没有设置的东西就要在#pragma中设定,如果你做过静态链接库应该会用到#pragma的.Top

相关问题

  • template,using 在C++中的用法,我书上好像从来没有看到过!
  • 命名空间是什么意思,我才以往的程序设计中从来没有用过,不过很多书上都有?
  • 从来没有遇到的情况
  • 从来没有遇到过的问题?
  • 在CSDN从来没有过的问题!`
  • #pragma once 什么意思?
  • 为什么从来没有看见有人得分?
  • 从来没有象今晚这样,这么想当斑竹~~~
  • 一个从来没有见到的奇怪的语句:
  • 关于 AC‘97怪问题,从来没有遇到过,!

关键词

  • c++
  • 编译器
  • pragma
  • seg
  • inline
  • pragam是宏指令
  • warning
  • machine
  • 表示
  • 知道

得分解答快速导航

  • 帖主:bobshi
  • Cybergate
  • alan118
  • chengdulang
  • comptometer
  • BlueSky2008
  • woxihuanbohe
  • DanielWYO
  • DanielWYO

相关链接

  • C/C++ Blog
  • C/C++类图书
  • C/C++类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo