blob: 11c781cb1139eedc708eb5de615b3fb93e3b4eb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <stdio.h>
#include <stdarg.h>
void testVaCopyArg(char *fmt, ...) {
va_list ap, aq;
char *s;
va_start(ap, fmt);
va_copy(aq, ap); /* test va_copy */
s = va_arg(aq, char *);
printf("string %s\n", s);
}
int main() {
testVaCopyArg("s", "abc");
return 0;
}
|