Pass va_list or pointer to va_list?

前端 未结 6 858
遇见更好的自我
遇见更好的自我 2020-12-01 12:22

Suppose I have a function which takes variadic arguments (...) or a va_list passed from another such function. The main logic is in this function i

6条回答
  •  攒了一身酷
    2020-12-01 13:04

    I find the texts quite ambiguous on this question. The simplest is perhaps to look in the standard how predefined functions with va_list are supposed to receive it, e.g vsnprintf. And this is clearly by value and not by reference.

提交回复
热议问题