
#include <stdarg.h> #include <stdio.h> int vprintf(const char *format, va_list arg);
vprintf is equivalent to printf with
arg replacing the variable-argument list.
arg has been initialized by the va_start
macro and possibly va_arg calls. vfprintf does not invoke the
va_end macro. See va_arg, va_end, and va_start for
details on varying-length argument-list functions.
vprintf returns the number of characters transmitted to stdout or
a negative value if an output error occurs.
stdout with printf
and sends the remaining text to stdout with vprintf:
#include <stdarg.h>
#include <stdio.h>
void error(char *fname, char *format, ...)
{
va_list args;
va_start(args, format);
printf("ERROR in %s: ", fname);
vprintf(format, args);
va_end(args);
}
printf, va_start, vfprintf
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.