Why are default arguments trailing ones?

前端 未结 4 1277
难免孤独
难免孤独 2021-01-17 17:46

Why are default arguments in C++ trailing ones?

4条回答
  •  醉梦人生
    2021-01-17 18:02

    if you had void func(int a = 0, int b);, how would you specify to use the default parameter in calling this function?

提交回复
热议问题