(...) as the function input parameters.

Contributor
11Feb2006,19:06   #1
aspguy's Avatar
When i declare a function in C , with (...) in the input area, how do I refer to these variable in the function ??
Team Leader
11Feb2006,22:26   #2
coderzone's Avatar
(...) 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().
Contributor
11Feb2006,22:28   #3
aspguy's Avatar
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.
Contributor
11Feb2006,22:29   #4
aspguy's Avatar
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.
Team Leader
11Feb2006,22:32   #5
coderzone's Avatar
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.
Contributor
11Feb2006,22:33   #6
aspguy's Avatar
Quote:
Also you should give more than 3 and half hours for a reply.
Yeah I agree.