An ellipsis at the end of the parameter specifications is used to specify that a function has a variable number of parameters. The number of parameters is equal to, or greater than, the number of parameter specifications.
int f(int, ...);

The comma before the ellipsis is optional. In addition, a parameter declaration is not required before the ellipsis.
At least one parameter declaration, as well as a comma before the ellipsis, are both required in C.
沒有留言:
張貼留言