Ellipsis Parameter

Feb 2, 2009 at 10:47pm
I was wondering when using the ellipsis parameter (the three dots, "...") for example:
int func(int a, ...);
If there is a way to access the parameters passed where "..." is that is NOT using va_list etc.
Thanks.
Feb 3, 2009 at 12:25am
Nope.
Feb 3, 2009 at 12:36am
Another alternative to using ... might be default parameters; if that helps. For example, you could have a function that takes 3 parameters defined with defaults for the second 2, such that you could call the function with only 1 parameter, with 2 parameters, or with all 3.

1
2
3
4
5
void f( int x, int y = 0, bool z = true ) {}
//...
f( 1 );
f( 1, 2 );
f( 1, 2, false );
Feb 4, 2009 at 5:08pm
Thanks for the replies, yeah seymore that helps =)
Topic archived. No new replies allowed.