Hi at all,
Is it possibile create a function/method use Variable Arguments as c language ?
Or using library ? which? Anyone know a good library for this scope ?
Or another way for create a function with dynamic number of pamaters input ?
Thanks at all !
another way to use an array.
But with this choice i must set all parameters before call function, and read all in parameters in function.
No, dynamic number of arguments is not allowed in functions.
So, your best bet is to use a dynamic array or a structure. Since arrays and structures are passed by reference, you can keep it dynamic and keep incrementing array values as required.
If you are looking for same function having different types of arguments, you can even try function overloading: