No Subject



On Sun, 16 Jan 2000, Jeroen Ruigrok/Asmodai wrote:

> >
> >typedef void    (*GtkItemFactoryCallback)  ();
> >
> >to
> >
> >typedef void    (*GtkItemFactoryCallback)  (void);
> 
> I mistook them for empty braces.  But I understand these should be
> variable argument cases.  Am I correct in this assumption?

No. The way to declare a variadic function in C and C++ is to use ellipses.  An
empty parameter list in C++ declares a function that takes no parameters, like
the (void) list in ANSI C.  An empty parameter list in C declares a function
which takes a fixed number of arguments, but does not specify that number, or
their types.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]