• 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.

  • 相关阅读:
    wpf图片查看器,支持鼠标滚动缩放拖拽
    Python 3.x 学习笔记--杂
    Python 3.x 模块
    python 连接kafka
    Oracle问题
    Device Mapper Multipath(DM-Multipath)
    各种书籍
    Centos 6.x系统
    老男孩Python 3.x 讲义
    Python 3.x 学习笔记
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1401390.html
Copyright © 2020-2023  润新知