📜  如何在 C++ 代码示例中使参数成为可选参数

📅  最后修改于: 2022-03-11 14:44:50.546000             🧑  作者: Mango

代码示例1
void myfunc(int blah, int mode = 0)
{
    if (mode == 0)
        do_something();
     else
        do_something_else();
}
//Optional parameter must be the rightmost parameter.