In modern C++(ie, version>=11), what is best way to implement a function with a variables number of int parameters?
I only want int
s, not a general type.
Each of the parameters is of type int and no other type is allowed.
void foo(/*WHAT'S HERE*/) {
// and how do I access the arguments here?
}
int main()
{
foo(34,1);
foo(9,2,66,1);
// etc
return 0;
}