VMS Help  —  CRTL  vfwprintf  Examples
      The following example shows the use of the vfwprintf function
      in a general error reporting routine:

         #include <stdarg.h>
         #include <stdio.h>
         #include <wchar.h>

         void error(char *function_name, wchar_t *format,  . . . );
         {
            va_list args;

            va_start(args, format);
            /* print out name of function causing error */
            fwprintf(stderr, L"ERROR in %s: ", function_name);
            /* print out remainder of message */
            vfwprintf(stderr, format, args);
            va_end(args);
         }
Close Help