For a long time, C has let you write functions that take a variable number of arguments. But C leaves it up to each variadic function to figure out how many arguments it’s been passed, and up to each caller to pass the right arguments.
Here’s a cute hack to make variadic functions easier to write and a little harder to call incorrectly.
Advertisements