'Using a function with a variable number of arguments [duplicate]
Consider the following code:
#include <iostream>
int var_arg_func(...)
{
std::cout << "Func called!";
}
int main()
{
var_arg_func(0, 1, 2);
}
As you can see here I can pass a variable number of arguments to the function var_arg_func.
But my question is how can I access those arguments from the function itself? (I'm using C++20)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
