Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

overloaded functions if insufficient arguments?

21 views
Skip to first unread message

pedr...@lycos.com

unread,
Jun 21, 2016, 6:20:53 AM6/21/16
to
I was looking through an open-source train wreck, and a certain
function is overloaded. There are 4 definitions of the function
with 3,4,5 or 7 arguments.
Now the function with this name is called with 3,4,6 or 7 arguments.
The call with 6 arguments has used the first 6 of the 7 definition
but dropped the last argument (integer).
So will it just zero for the missing argument?

Victor Bazarov

unread,
Jun 21, 2016, 7:42:55 AM6/21/16
to
Look at the declaration of the function with 7 arguments. Most likely
it has a default value for the 7th one. The compiler will not supply
any value unless it's specified.

V
--
I do not respond to top-posted replies, please don't ask
0 new messages