Created
April 27, 2016 14:15
-
-
Save zzt93/4a93246040dc03ee8e83619f481047c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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