Variadic functions

How can I use functions from cstdarg header in this situation?
1
2
3
4
5
6
7
8
9
10
void x(...)
{
// ?
}

int main()
{
x(11,12,13);

}

I know that it should be void x(int number_of_arguments,...) but the above code compiles too so there must be a way to use it.

Thanks for help.
There isn't.

The macros in stdargs start with a given stack reference and allow you to deduce the remainder of the parameters. Without a starting point, you don't know where in the stack to begin.
So why does this code compiles?
If compiles because it's syntactically correct. But you can't access those parameters you passed in.
OK, thanks.
Topic archived. No new replies allowed.