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.

  • 相关阅读:
    记录相关操作
    mysql数据类型
    完整性约束
    表相关操作
    MySQL存储引擎
    库相关操作
    linux学习笔记2---命令cd
    linux学习笔记命令篇1---命令ls
    linux常用命令系列
    redis34--string 操作
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1401390.html
Copyright © 2011-2022 走看看