As I see sscanf, it has one good options of variable number of arguments.

I have already written one article OutputDebugString with variable number of arguments which tells you how to go about doing with the variable number of arguments. You can take help of this function to see how to get the arguments in the functions as well as substitute them at the needed place.