Heres one ive been scouring the internet for and no one has ever come up with a workable solution. Here is the issue.
I need to write a wrapper for sprintf. In essence I have a function which takes a char string, and an unknown number of arguments. I do some proccessing to the char string and then need to pass the char string as well as the unknown number of arguments off to sprintf for further proccessing and then return the finished product. No one has been able to figure out how to pass on, whole sale, the unknown number of arguments to a function which takes the same. A few people have mentioned possibly using inline assembly to manualy construct the call stack to sprintf, but have never offered any code to the affect and inline assembly such as that is a little bit beyond my abilitys.
Just incase it makes a differnce. Im coding in Win32 Visual C++ 2005 using ANSI functions. I desperatly hope someone can give me at least a clue in the right direction here.