Using var_arg to pass parameters for function calls
问题 I am writing an adapter to combine two APIs (one in C and another in C++). If a function is called on the one API I need to pass the callers ID and the function's arguments to an adapter and call the according function with this information passed. Now aparently they can not be mapped directly as one interface requires C++ compilation and the name mangling would screw the other so that is why I am using a set of adapters in the first place. As the number of arguments varies, I looked up