zoukankan      html  css  js  c++  java
  • _In_ 是什么意思

    函数参数类型前 _In_
    代表什么
     

     
    在visual C++中属于SAL批注,是为了编译系统在分析代码时发现缺陷用的
     
    表示是一个输入参数。
    可以定义一个_In_的宏,这个宏什么都不做,
    就是形如这样的。
    #define _In_ 
    void fun(int _In_ x);      等同于
    void fun(int x);
     
    但是他给出了参数x是输入的意思

    类似的还有_Out_
    #define _Out_

    // In.h
    #ifndef _In_ // 如果没有这样的宏,那么多文件都包含In.h编译就会报错了
    #define _In_
    //....
    #endif
     
     
    // In.c
    #include "In.h"
     
     
    // main.c
    #include "In.h"
     
  • 相关阅读:
    C++类模板的三种特化
    构造函数抛异常
    ScrapySharp
    QtWebKit
    visual studio 插件
    asp.net 开源
    cfr
    eclipse icon
    JAD Java Decompiler
    Java Decompiler
  • 原文地址:https://www.cnblogs.com/LeoGodfrey/p/3644107.html
Copyright © 2011-2022 走看看