How to pass optional arguments to a method in C++?
Here is an example of passing mode as optional parameter you can call myfunc in both ways and both are valid
Here is an example of passing mode as optional parameter you can call myfunc in both ways and both are valid
Try calling it like: obj.some_function( ‘1’, 2, ‘3’, g=”foo”, h=”bar” ). After the required positional arguments, you can specify specific optional arguments by name.