(...) as the function input parameters.
|
Contributor
|
|
| 11Feb2006,19:06 | #1 |
|
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 |
|
(...) 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 |
|
Quote:
Originally Posted by aspguy |
|
Contributor
|
|
| 11Feb2006,22:29 | #4 |
|
Quote:
Originally Posted by coderzone |
|
Team Leader
|
![]() |
| 11Feb2006,22:32 | #5 |
|
Quote:
Originally Posted by aspguy Quote:
Originally Posted by aspguy |
|
Contributor
|
|
| 11Feb2006,22:33 | #6 |
|
Quote:
|
