C++ Language/ProgramFlow/Parameters/VariableNumberOfParameters
This is the current revision of this page, as edited by SoftwareEngineerMoose (discuss | contribs) at 07:05, 21 February 2022 (Created page with "{{C++ Language}} A parameter's type could be <code>std::initializer_list<int></code>. This allows for passing either as <code>DoFunction({11,22,33})</code> or as <code>DoFunction(11,22,33)</code>. [https://www.youtube.com/watch?v=CIFIhzcvmUQ Additional information about having a variable number of parameters (includes interactive examples)] {{BookCat}}"). The present address (URL) is a permanent link to this version.
| C++ Language |
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)