What are variadic functions in accordance with C and C++?

前端 未结 3 805
耶瑟儿~
耶瑟儿~ 2020-12-22 04:26

I am confused. As i asked the question previously about overloading in C, i got some answers.

Whenever i try to make others understand about this, I get confused in

3条回答
  •  攒了一身酷
    2020-12-22 05:15

    As clearly said so, it used to accept any number of arguments.

    Generally, there might be requirements for such method when the user doesn't know how many variables to be passed inside.

    Eg: For requirement 1, you require to call the method with 2 parameters. For requirement 2, you require to call the same method with 3 parameters.

提交回复
热议问题