vprintf

The vprintf family of functions operate in a manner similiar to the printf family. The only difference is that the vprintf functions take a named va_list argument in place of the trailing ... that the printf functions take. Typicially the printf family defers to the corresponding member of the vprintf family.

namespace std { int vprintf(char const * format, va_list args); int vfprintf(FILE * file, char const * format, va_list args); int vsprintf(char * buffer, char const * format, va_list args); int vsnprintf(char * buffer, size_t size, char const * format, va_list args); } 
 * 2) include 

Some libraries may also support: int vasprintf(char ** buffer_pointer, char const * format, va_list args);

Libraries may in addition support wchar_t forms of these functions, with names of vwprintf, vfwprintf, vswprintf and vsnwprintf

See printf for a detailed description of the format parameter.