void foo(...) . , .
foo(0); //This will call void foo(int) function
foo('A'); //This will call void foo(int) function
foo("str"); //This will call void foo(...) function
foo(0, 1); //This will call void foo(...) function
:
Although ellipsis works great when overloading a function, it is not recommended to use variable functions. At least until you have significantly more experience in C ++ to understand the pitfalls. I would suggest using it only with the catch try block, where there are situations where the error cannot be predicted.
source
share