NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Code (Score:1)
#include <stdio.h>
#include <stdarg.h>
void bar(int cnt,
va_list ap;
va_start(ap,cnt);
while (cnt--) {
int a = va_arg(ap, int);
printf("%d ", a);
}
printf("\n");
}
int main() {
void (*b)(int,
b = bar;
b(2,1,2);
b(3,1,2,3);
return 0;
}
Or did I miss something?
Reply to This
Re: (Score:1)
Hmm, no. I missed
b = bar;in my example, which leads me to wonder why there was no crash.Thanks for the sanity check! Now I need to figure out how to add varargs support to NCI.