Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

va_list with multiple types

Name: Anonymous 2010-07-24 1:23

i want to write soemthing like this:
a function which will print various types of arguments.
I tried to work with va_list, it doesn't work.
int main(){
write("this ",1.2," is ",'a',7," test");
}
should result in:
this 1.2 is a7 test

Name: Anonymous 2010-07-24 2:18

What i want :
functionname (...){for(i=0;i<args;i++)print(eachArgument[i]);}
float a=5.4;char* b="text";int c=1;long double d=5e200;
functionname(a,b,c,d)
functionname(a,b,c)
functionname(a,b)
Is this possible in C?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List