I think this question already exists. But I can't search for the keyword "...". How to declare and use function with "...". Hope someone can help me solve this problem. Thank you.
Asked
Active
Viewed 4,490 times
0
-
[varargs](http://en.cppreference.com/w/cpp/utility/variadic) – Ed Heal Mar 27 '17 at 09:09
-
AFAIK, it means there is no limit of params. When you set a format for the char array, you may need several parameters, since it is not a fixed value, you are free to define as many as you want. – JonZarate Mar 27 '17 at 09:10
-
http://stackoverflow.com/questions/1657883/variable-number-of-arguments-in-c – Ankur Jyoti Phukan Mar 27 '17 at 09:10
-
Very grateful if you give me an example. – Hoàn Trần Mar 27 '17 at 09:13
-
If you are learning C++ you probably don't want to do this. It is possible to overload functions with the same name and different (but fixed) number of parameters. In C you cannot do that, and will have to use this sledge hammer. – Bo Persson Mar 27 '17 at 09:14
-
thank you very much – Hoàn Trần Mar 27 '17 at 09:14