I want to create a "fullname" variable from multiple strings. Something like this:
strcpy (fullname, firstname);
strcat (fullname, separator); // separator is initialized at " "
strcat (fullname, middlename);
strcat (fullname, separator);
strcat (fullname, lastname);
This code is repeated at multiple places in my project. I was gonna do a function that does exactly that, but now I wonder if there isn't a better way to do it.
Any ideas?