#include #include struct S { int i; }; char * foo (char *p, char *r, struct S *w) { char *q = malloc (strlen (p) + strlen (r) + 64); if (q == NULL) return NULL; strcpy (q, p); strcat (q, "/"); strcat (q, "abcde"); strcat (q, r); strcat (q, "/"); return q; }