hbc
hbc

Reputation: 13

Functions arugments ... in C

void foo(const gchar *a, ...)
{
    do_something();
}

What does the ... mean?

Does it only work with glib?

Upvotes: 1

Views: 97

Answers (1)

Yang Chi
Yang Chi

Reputation: 432

It is variable-length argument list which allows a function to have flexible number of arguments. It's part of the Standard. So it works everywhere that standard C is supported (or this feature itself is supported), not just glib.

Upvotes: 2

Related Questions