How do I go about correctly wrapping a Variadic function when I need to change the first parameter's type?
For instance:
void original_function(char* format, ...)
{
// Other Code Here
}
void wrapper(string format, ...)
{
va_list args;
va_start(args, format);
original_function(format.c_str(), args);
va_end(args);
}
For some reason, the need to convert it and cast it to a c string causes the other variables to not be read correctly. How do I correctly pass this information on while changing types of the first parameter?