Search code examples
cvariadic-functionsellipsisfunction-declaration

What '...' indicates in function parameter in c?


I was going through the logger code and came across a function

bool  LogMessage(const char *szFor, ...)

What does ... indicates here?


Solution

  • This is called an ellipsis notation. This means, the function is a variadic function.

    It can legally accept any number and type of incoming arguments.