C++ Language/ProgramFlow/Parameters/VariableNumberOfParameters
Appearance
A parameter's type could be std::initializer_list<int>
.
This allows for passing either as DoFunction({11,22,33})
or as DoFunction(11,22,33)
.
Additional information about having a variable number of parameters (includes interactive examples)