S
srdgame
Hi all
The example code is below:
#include <cstdio>
#include <cstdarg>
void my_printf(const char* source, const char* format, ...)
{
va_list ap;
va_start(ap, format);
vprintf(format, ap);
//char buf[1024];
//vsprintf(buf, format, ap);
//printf("%s", buf);
//va_end(ap);
}
void my_printf_2(const char* source, const char* format, ...)
{
// How to call my_printf??
my_printf(xxxxxx);
}
int main()
{
my_printf("TEST", "\tString: %s \n", "sssss");
}
And my question is how could I call my_printf in my_printf_2 ??
Thanks for your time.
The example code is below:
#include <cstdio>
#include <cstdarg>
void my_printf(const char* source, const char* format, ...)
{
va_list ap;
va_start(ap, format);
vprintf(format, ap);
//char buf[1024];
//vsprintf(buf, format, ap);
//printf("%s", buf);
//va_end(ap);
}
void my_printf_2(const char* source, const char* format, ...)
{
// How to call my_printf??
my_printf(xxxxxx);
}
int main()
{
my_printf("TEST", "\tString: %s \n", "sssss");
}
And my question is how could I call my_printf in my_printf_2 ??
Thanks for your time.