Anonymous user
Named parameters: Difference between revisions
→{{header|C++}}
(→{{header|Ruby}}: Show the future: MRI 2.0.0dev (2012-01-04 trunk 34211).) |
|||
Line 98:
You wrap the parameters in a class, and make the function a friend of the parameter class.
<lang
friend void foo(foo_params p);
public:
Line 128:
Declare the function to take the parameter class as its only parameter.
<lang
Call the function using the parameter object constructor with the required parameters and chaining the optional parameters.
<lang
|