c - how to make a function with multiple arguments (va_list)?

依然范特西╮ 提交于 2019-12-13 11:17:58

问题


I have a nice C++ function, which supports multiple arguments through va_list + va_start + va_arg. But I had to convert my project to C. After conversion, this va_list construction gets rejected by the compiler (multiple errors). Is there any way to do that thing in C, and (if yes) what I need to change?


回答1:


The Wikipedia page on stdarg has probably everything you need.



来源:https://stackoverflow.com/questions/9549947/c-how-to-make-a-function-with-multiple-arguments-va-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!