Eric Sosman <> spoke thus:
> #include <string.h>
> #define STRING1 "my name is john"
> #define STRING2 "i like the beach."
> ...
> char array[sizeof STRING1 + sizeof STRING2] = STRING1;
> strcat(array, "\t");
> strcat(array, STRING2);
It might be better to have "\t" #define'd as it's own string, since
the space needed for array is dependent on the string passed in the
first call to strcat(). I personally like
char array[sizeof STRING1 + sizeof STRING2]=STRING1;
sprintf( array+sizeof(STRING1)-1, "%c" STRING2, '\t' );
which is either correct or an opportunity for me to learn something
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.