If Linux is your concern, the easiest way to append two strings:
char * append(char * string1, char * string2)
{
char * result = NULL;
asprintf(&result, "%s%s", string1, string2);
return result;
}
This won't work with MS Visual C.
Note: you have to free()
the memory returned by asprintf()