I want to write a function writelog() with ellipsis parameters, which should forward the same ellipsis parameters to another function. How to do it?
My function example:
void writetolog(char *format, ...)
{
    FILE *file;
    if ((file = fopen(LOG_FILE, "a")) != NULL)
    {
        fprintf(file, format, ...);
        fclose(file);
    }
}
Function fprintf() should have the same ellipsis parameters from function writetolog().
 
     
    