Skip to content

Instantly share code, notes, and snippets.

@zzt93
Created April 27, 2016 14:15
Show Gist options
  • Save zzt93/4a93246040dc03ee8e83619f481047c8 to your computer and use it in GitHub Desktop.
Save zzt93/4a93246040dc03ee8e83619f481047c8 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdarg.h>
void hello2(int p1, int p2)
{
printf("hello2 %d %d\n", p1, p2);
}
void hello3(int p1, int p2, int p3)
{
printf("hello3 %d %d %d\n", p1, p2, p3);
}
static void hello(int p1, int cmd, ...)
{
if (cmd == 7)
{
va_list v;
va_start(v, p2);
int p3 = va_arg(v, int);
va_end(v);
hello3(p1, p2, p3);
return;
}
hello2(p1, p2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment