Thread: Manipulating Args Passed to Variadic Functions

  1. #1
    Registered User
    Join Date
    Jul 2007

    Manipulating Args Passed to Variadic Functions

    I have a c function declared as such:
    logOut(unsigned char logLevel, char *msg, ...);
    I want to manipulate msg and the variadic variables and then pass them into snprintf, but I don't know how to manipulate the variadic variables. I know how to get them with the VA_XXX macros, but then I don't know how to pass them to another variadic function (snprintf). Because there will be a different number of values each time I can't hard code anything. Does anyone know how to do this?

    Thanks in advance.

  2. #2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Attaching functions to a class/struct
    By VirtualAce in forum Tech Board
    Replies: 2
    Last Post: 08-04-2003, 10:56 AM
  2. Functions taking ? # of args
    By JaWiB in forum C++ Programming
    Replies: 7
    Last Post: 06-04-2003, 10:23 PM
  3. Expression Manipulator v0.2 (bug fixes, functions)
    By ygfperson in forum A Brief History of
    Replies: 4
    Last Post: 05-26-2003, 04:52 PM
  4. Replies: 13
    Last Post: 02-09-2003, 04:52 PM
  5. API "Clean Up" Functions & delete Pointers :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-10-2002, 06:53 PM