zoukankan      html  css  js  c++  java
  • C Standard Library: 7 Variable Argument Lists: <stdarg.h>

    7 Variable Argument Lists: <stdarg.h>

    The header <stdarg.h> provides facilities for stepping through a list of function arguments of
    unknown number and type.
    Suppose lastarg is the last named parameter of a function f with a variable number of
    arguments. Then declare within f a variable of type va_list that will point to each argument
    in turn:
    va_list ap;
    ap must be initialized once with the macro va_start before any unnamed argument is
    accessed:
    va_start(va_list ap, lastarg);
    Thereafter, each execution of the macro va_arg will produce a value that has the type and
    value of the next unnamed argument, and will also modify ap so the next use of va_arg returns
    the next argument:
    type va_arg(va_list ap, type);
    The macro
    void va_end(va_list ap);
    must be called once after the arguments have been processed but before f is exited.

  • 相关阅读:
    Oracle分页查询
    Oracle表空间
    Oracle中DBA常用操作
    数据库的约束
    数据库设计的三范式
    数据类型的比较 有四种情况
    github快速上手
    3D正方体做法
    animation-声明关键帧
    轮播图样式
  • 原文地址:https://www.cnblogs.com/freewater/p/2973381.html
Copyright © 2011-2022 走看看