(...) as the function input parameters.

aspguy's Avatar, Join Date: May 2005
Contributor
When i declare a function in C , with (...) in the input area, how do I refer to these variable in the function ??
coderzone's Avatar, Join Date: Jul 2004
Team Leader
(...) in any function means that the function has variable no of parameters and so the parameters can be determined by the First parameter of the argument list. The best example of such function is printf.

You can get the argument passed to the function using the combination of va_arg, va_list, va_start and va_end. va_arg can give you each successive arguments in va_list.The list must be initialized by calling va_start() before any calls to va_arg(). The list must be finalized by calling va_end().
aspguy's Avatar, Join Date: May 2005
Contributor
Quote:
Originally Posted by aspguy
When i declare a function in C , with (...) in the input area, how do I refer to these variable in the function ??
I am still waiting for the reply from the Experts.
aspguy's Avatar, Join Date: May 2005
Contributor
Quote:
Originally Posted by coderzone
(...) in any function means that the function has variable no of parameters and so the parameters can be determined by the First parameter of the argument list. The best example of such function is printf.

You can get the argument passed to the function using the combination of va_arg, va_list, va_start and va_end. va_arg can give you each successive arguments in va_list.The list must be initialized by calling va_start() before any calls to va_arg(). The list must be finalized by calling va_end().
Ohh Thanks for the Reply Coderzone and probably we visited the thread almost at the same time and submitted the post just after you posted.
coderzone's Avatar, Join Date: Jul 2004
Team Leader
Quote:
Originally Posted by aspguy
Ohh Thanks for the Reply Coderzone and probably we visited the thread almost at the same time and submitted the post just after you posted.
It Looks like.
Quote:
Originally Posted by aspguy
I am still waiting for the reply from the Experts.
Also you should give more than 3 and half hours for a reply.
aspguy's Avatar, Join Date: May 2005
Contributor
Quote:
Also you should give more than 3 and half hours for a reply.
Yeah I agree.