In a C function declaration, what does “…” as the last parameter do?

后端 未结 6 639
借酒劲吻你
借酒劲吻你 2020-11-28 06:56

Often I see a function declared like this:

void Feeder(char *buff, ...)

what does \"...\" mean?

6条回答
  •  盖世英雄少女心
    2020-11-28 07:11

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

    you have to access them with va_start, va_arg and va_end

    see http://publications.gbdirect.co.uk/c_book/chapter9/stdarg.html for more information

提交回复
热议问题