R
rihad
To make up a proper dynamically allocated empty C string, would it suffice to
say:
return calloc(1, 1);
or am I better off using the longer version
char *p = malloc(1);
if (p) *p = 0;
return p;
? TIA
say:
return calloc(1, 1);
or am I better off using the longer version
char *p = malloc(1);
if (p) *p = 0;
return p;
? TIA