C语言 两个[不定参函数]之间如何进行 [参数传递]

有两个像printf那样的函数,printf_1和printf_2,
它俩都是 不定参 的函数,
这时我需要在printf_1里调用printf_2,也就是说传入printf_1的参数要原封不动的传给printf_2,如何实现?

第1个回答  2012-02-26
//直接转发
#include <stdio.h>

__declspec(naked)void printf1(const char * _Format, ...)
{
__asm
{
push printf
ret
}
}
int _tmain(int argc, _TCHAR* argv[])
{
printf1("%d",1);
printf1("%d %d",1,1);
getchar();
return 0;
}
相似回答