在C函数声明有哪些呢" ..."作为最后一个参数呢? [英] In a C function declaration, what does "..." as the last parameter do?

查看:129
本文介绍了在C函数声明有哪些呢" ..."作为最后一个参数呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常看到声明如下功能:

Often I see a function declared like this:

void Feeder(char *buff, ...)

什么是..​​.是什么意思?

what does "..." mean?

推荐答案

它允许未指定类型的参数变量数(如的printf 一样)。

it allows a variable number of arguments of unspecified type (like printf does).

您有的va_start 的va_arg 来访问它们和 va_end用来

看<一个href=\"http://publications.gbdirect.co.uk/c_book/chapter9/stdarg.html\">http://publications.gbdirect.co.uk/c_book/chapter9/stdarg.html了解更多信息。

这篇关于在C函数声明有哪些呢&QUOT; ...&QUOT;作为最后一个参数呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆