using variable number arguments (of type char *)
Jeff Hartkopf
hartkopf at tramp.Colorado.EDU
Sat Sep 30 09:01:20 AEST 1989
I want to write a (ANSI C) function that will concatenate any number of
character strings, leaving all original strings as they were, and
returning the resulting string. So somthing like:
char *concat(char *s, ...)
My problem is that I can't figure out how to manipulate these variable
number of arguments from the example in K&R 2nd edition. Also, would I
need to pass some space large enough to hold the final concatenated
string?
Thanks a lot for any suggestions/code/etc.
Jeff Hartkopf
Internet:
hartkopf at tramp.Colorado.EDU
More information about the Comp.lang.c
mailing list