Topic: Variadic functions with no parameters
Author: peter_ammon@rocketmail.com
Date: Wed, 27 Apr 2005 01:07:10 CST Raw View
The C++ grammar appears to admit (and g++ accepts)
void function(...);
In such a function, how do you access any of the parameters? And what
was the motivation for allowing functions of this type where C forbids
them?
I also notice that C++ makes the comma optional, whereas it's mandatory
in C. That is, this is a legal prototype:
void function2(int ...);
What is the motivation for this change?
Followups set to comp.lang.c++
Thanks,
-Peter
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]