vprintf, vwprintf

Write formatted output using a pointer to a list of arguments.

int vprintf( const char *format, va_list argptr );

int vwprintf( const wchar_t *format, va_list argptr );

Routine Required Header Optional Headers Compatibility
vprintf <stdio.h> and <stdarg.h> <varargs.h>1 ANSI, Win 95, Win NT
vwprintf <stdio.h> or <wchar.h>, and <stdarg.h> <varargs.h>1 ANSI, Win 95, Win NT

1 Required for UNIX V compatibility.

For additional compatibility information, see Compatibility in the Introduction.

Libraries

LIBC.LIB Single thread static library, retail version
LIBCMT.LIB Multithread static library, retail version
MSVCRT.LIB Import library for MSVCRT.DLL, retail version

Return Value

vprintf and vwprintf return the number of characters written, not including the terminating null character, or a negative value if an output error occurs.

Parameters

format

Format specification

argptr

Pointer to list of arguments

Remarks

Each of these functions takes a pointer to an argument list, then formats and writes the given data to stdout.

Generic-Text Routine Mappings

TCHAR.H Routine _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined
_vtprintf vprintf vprintf vwprintf

Stream I/O Routinesvprintf Functions Overview

See Also   fprintf, printf, sprintf, va_arg