A
Artie Gold
Simon said:Artie said:vire wrote:
[failing to quote the relevant portions of the post to which he/she
was responding]
#include <stdio.h>
#include <string.h>
char* getCat(char* str1,char* str2)
{
int i=strlen(str1)+strlen(str2);
BZZZZT! And the terminating null character goes where?
ITYM:
int i = strlen(str1) + strlen(str2);
I fail to see any meaningful difference. I think you meant to add a one
Ack! Of course!!!!!
....and some nights I *should* go to bed early...in there. Also, the variable should be of type size_t.
That will require that you #include <stdlib.h>, which I didn't see you
mention.
;-(
--ag