Passing optional parameter by reference in c++

后端 未结 10 1855
天涯浪人
天涯浪人 2020-12-02 22:39

I\'m having a problem with optional function parameter in C++

What I\'m trying to do is to write function with optional parameter which is passed by reference, so th

10条回答
  •  忘掉有多难
    2020-12-02 23:02

    It is much easier to use a pointer type and setting it to NULL than setting default/optional value for a reference parameter.

提交回复
热议问题