5

如何将 list 的值传给函数的可变参数?

 2 years ago
source link: https://www.v2ex.com/t/798901
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  C++

如何将 list 的值传给函数的可变参数?

  icemanpro · 2 小时 49 分钟前 · 278 次点击
7 条回复    2021-08-30 20:50:07 +08:00

zzxxisme   2 小时 41 分钟前 via Android

这个问题问得不知道怎么回答,因为描述不清楚,可以有很多种理解,例如是把整个 list 当做一个参数传给函数,还是把 list 的每个元素拿出来传给函数的每个参数?你的 list 和函数的签名是怎样的?最好能给段代码来表明你要做的事情,还有你做过什么样的尝试,这些尝试有什么问题。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK