I recently make this code to concate 2 string...i am using cygwin at home...and this code working as i expected :
so when i put for example str_concat( mike, mike ) it will return "mikemike" (without the quote)
char *str_concat( char *string1, char *string2 )
int len1, len2;
/* edited */
string3 = '\0';
however when try to run it at school, in unix machine it doesn't work ( I've change the file format using dos2unix ). if i put str_concat( mike, mike ) it will return "mikemikelv55/k" (without quote) instead of "mikemike" -> and somethin weird, it not always giving addition "lv55/k" sometimes it gives like "xxlv55/k/x" in the back...always in the back...
this is mess up the whole program of mine ;( it is due on monday..and only becoz of one small part not working, the whole program not gonna work )