Thread: How to use variadic functions

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    144

    How to use variadic functions

    Hi, everyone. I have a library function like this:

    Code:
    curl_formadd (arg1, arg2, ...);
    I want to call it from inside another function, like this:

    Code:
    myfunction (arg1, arg2, ...)
    {
       curl_formadd (arg1, arg2, ...);
    }
    Now, I know the 'proper' way to do this is with variadic functions, but there is no variadic variant of the library function. Is there an acceptable way to do this kind of thing? I can't just remove myfunction() altogether because some of the arguments, and indeed the number of arguments, will be modified at runtime before they are fed into the library function.

    Richard

  2. #2
    Registered User
    Join Date
    May 2010
    Location
    Naypyidaw
    Posts
    1,314

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with functions
    By jusfry01 in forum C Programming
    Replies: 2
    Last Post: 05-22-2010, 06:25 PM
  2. Functions calling other functions.
    By kbro3 in forum C++ Programming
    Replies: 2
    Last Post: 12-27-2009, 12:10 AM
  3. Void Functions Help
    By bethanne41 in forum C++ Programming
    Replies: 1
    Last Post: 05-09-2005, 05:30 PM
  4. Functions and Classes - What did I do wrong?
    By redmage in forum C++ Programming
    Replies: 5
    Last Post: 04-11-2005, 11:50 AM
  5. calling functions within functions
    By edd1986 in forum C Programming
    Replies: 3
    Last Post: 03-29-2005, 03:35 AM

Tags for this Thread