Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>vsprintf() write formatted data to string</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 vsprintf()              Write Formatted Data to String

 #include   <stdio.h>
 #include   <stdarg.h>                  Use for ANSI C standard compatibility

 int        vsprintf(buffer,format-string,arg-ptr);
 char       *buffer;                     Storage location for output
 const char *format-string;              Format control
 va_list    arg-ptr;                     Pointer to list of arguments

    vsprintf() formats and prints a series of characters and values to
    'buffer'.  It is like sprintf(), but accepts a pointer to a list of
    arguments rather than a list of arguments.

    'arg-ptr' has the type 'va_list'.  It is defined in <stdarg.h>
    (required for compatibility with proposed ANSI C standard).
    'arg-ptr' points to a list of arguments.  These arguments are
    converted and output according to specifications in 'format-string'.
    (For the inner workings of variable-length parameter lists, see
    va_start(), va_arg(), and va_end()).

    See printf() for a complete description of 'format-string'.


See Also: sprintf() va_arg()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson