home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------*/
- /* ╡{ªí└╔ªW║┘: wat202.c */
- /*------------------------------------------------------------------*/
- #include <stdio.h>
- #include <conio.h>
- #include <stdarg.h>
-
- char buf[80];
-
- int argument_list(char *previous, ...)
- {
- va_list param;
- int cnt;
-
- va_start(param, previous);
- cnt = vsprintf(buf, previous, param);
- va_end(param);
-
- return(cnt);
- }
-
- void main()
- {
- char *str1 = "Fox SoftWare";
- int number1 = 38;
- float number2 = -179.0;
- char *str2 = "Microsoft";
-
- argument_list("%s %d %f %s\n",str1, number1, number2,str2);
- printf("%s\n",buf);
- }