Variable number of arguments in C++?

后端 未结 17 1768
-上瘾入骨i
-上瘾入骨i 2020-11-21 23:13

How can I write a function that accepts a variable number of arguments? Is this possible, how?

17条回答
  •  孤独总比滥情好
    2020-11-21 23:38

    The only way is through the use of C style variable arguments, as described here. Note that this is not a recommended practice, as it's not typesafe and error-prone.

提交回复
热议问题