zoukankan      html  css  js  c++  java
  • Pragma Directives

    在编写程序的时候,我们经常要用到#pragma指令来设定编译器的状态或者是指示编译器完成一些特定的动作。

    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.

    Pragmas can be used in conditional statements, to provide new preprocessor functionality, or to provide implementation-defined information to the compiler.

    If the compiler finds a pragma it does not recognize, it issues a warning, but compilation continues.

    Some pragmas provide the same functionality as compiler options. When a pragma is encountered in source code, it overrides the behavior specified by the compiler option.

  • 相关阅读:
    Django中多表的增删改查操作及聚合查询、F、Q查询
    路由控制
    路由、视图、模板主要知识点回顾
    创建文件linux
    关于shell,环境变量放置在?
    snprintf和string操作函数
    C/C++的存储区域的划分
    001
    SAMBA服务器
    归并排序原理详解!
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1401390.html
Copyright © 2011-2022 走看看