[comp.lang.c] using variable number arguments

hartkopf@tramp.Colorado.EDU (Jeff Hartkopf) (09/30/89)

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@tramp.Colorado.EDU