我经常看到这样声明的函数:
void Feeder(char *buff, ...)
“...”是什么意思?
最佳答案
它允许可变数量的未指定类型的参数(就像 printf
那样)。
您必须使用 va_start
、va_arg
和 va_end
访问它们
参见 http://publications.gbdirect.co.uk/c_book/chapter9/stdarg.html了解更多信息
关于c - 在 C 函数声明中, "..."作为最后一个参数有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2735587/