Writes output to the console under format control
#include <stdarg.h> #include <stdio.h> int vcprintf ( const char *format, va_list arg);
(IN) Points to the format control string.
(IN) Specifies a variable argument.
The vcprintf function returns the number of characters written, or a negative value if an output error occurred. If an error occurs, errno is set.
The vcprintf function writes output to the console under control of the argument format. The format string is described under the description for printf. The vcprintf function is similar to printf, with the variable argument list replaced with arg, which has been initialized by the va_start macro.
fprintf and printf (Single and Intra-File Services), sprintf, va_arg, va_end, va_start (NLM and NetWare: Program Management), vprintf (Single and Intra-File Services)
The following example shows the use of vcprintf in a general error message routine.
#include <stdarg.h> #include <stdio.h> void errmsg (char *format, ... ) { va_list arglist; ConsolePrintf ("Error: "); va_start (arglist, format); vcprintf (format, arglist); va_end (arglist); }