W
Walter L. Preuninger II
I would like to write a generic procedure that will take string or numeric
variables. I can not think of a way to make this more clear except to show
what I want.
int main(void)
{
int i=7;
char *s="/etc/filesystems";
generic(i);
generic(s);
generic("Hello");
generic(2048);
exit(0);
}
should return:
7
/etc/filesystems
Hello
2048
so...
void generic( ???????)
{
???
}
I have looked at sprintf, varargs etc.
Could someone point me in the right direction?
Thanks,
Walter
variables. I can not think of a way to make this more clear except to show
what I want.
int main(void)
{
int i=7;
char *s="/etc/filesystems";
generic(i);
generic(s);
generic("Hello");
generic(2048);
exit(0);
}
should return:
7
/etc/filesystems
Hello
2048
so...
void generic( ???????)
{
???
}
I have looked at sprintf, varargs etc.
Could someone point me in the right direction?
Thanks,
Walter