Elegant way to pass multiple arguments to a function

前端 未结 6 1607
轮回少年
轮回少年 2020-12-13 05:52

I\'ve got a function which looks like this:

bool generate_script (bool net, bool tv, bool phone,
                        std::string clientsID,
                      


        
6条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-13 06:41

    If all these parameters are meaningfully related, pack them in a structure.

提交回复
热议问题