home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12478 < prev    next >
Encoding:
Text File  |  1992-08-17  |  1.3 KB  |  37 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!taumet!steve
  3. From: steve@taumet.com (Steve Clamage)
  4. Subject: Re: using (...) question
  5. Message-ID: <1992Aug17.170733.17470@taumet.com>
  6. Organization: TauMetric Corporation
  7. References: <J3mkPB8w165w@toz.buffalo.ny.us> <1992Aug16.221527.4992@sunb10.cs.uiuc.edu>
  8. Distribution: usa
  9. Date: Mon, 17 Aug 1992 17:07:33 GMT
  10. Lines: 25
  11.  
  12. pjl@sparc10.cs.uiuc.edu (Paul Lucas) writes:
  13.  
  14. >In <J3mkPB8w165w@toz.buffalo.ny.us> cyberman@toz.buffalo.ny.us (Cyberman) writes:
  15.  
  16. >>I know printf is prototyped as
  17. >>int printf(char *,...);
  18. >>I would like to know how from within the function to access the 
  19. >>remaing parameters!
  20.  
  21. >*****>    By using <varargs.h>  Stroustrup, 2nd. edition, has an example as
  22. >    does my book.
  23.  
  24. The usual C implementations of <varargs.h> are not usable in C++, as
  25. the macros result in illegal C++ code.
  26.  
  27. The Standard C header file <stdarg.h> serves the same purpose and is
  28. generally available with C++ implementations.  The ANSI/ISO C++
  29. committee has voted to make the Standard C header <stdarg.h> part of C++.
  30.  
  31. If at all possible, you should use <stdarg.h> rather than <varargs.h>.
  32. See any good Standard C text for information on the use of these macros.
  33. -- 
  34.  
  35. Steve Clamage, TauMetric Corp, steve@taumet.com
  36. Vice Chair, ANSI C++ Committee, X3J16
  37.