dear all,
next meeting i'll be giving a mini presentation on how to write functions
with a variable number of arguments.
perhaps you wondered how printf can take an arbitrary number of arguments:
#include<stdio.h>
int main(void)
{
int two = 2;
printf("%s number 1\n", "string");
printf("%s number %d\n", "string", two);
return(0);
{
how do you prototype such a function? in fact, even if you do have function
overloading, how do you handle an /arbitrary/ number of arguments?
perhaps you wondered what the "..." means in the prototype for printf:
int printf(const char *format, ...);
i sure did. the meaning is clear, but how do you "make it work"?
this will be the topic of my mini presentation at the next lugod meeting.
pete
--
"The following addresses had permanent fatal errors..." p@dirac.org
-- Mailer Daemon www.dirac.org/p