pietro77 wrote on Friday, January 25, 2008:

Hi all, I know it coludn’t be an OS trouble, but I’de like to know why if I write strcat(var1, var2), in var1 I’ll find the right result, but if I write strcat(var1, “hello”) the result in var1 is not correct, invar1 I’ll find the same content before the function call or, even worst, I’ll find an unclean content.
This is not the behaviour of other functions (like strcmp) that work well in both cases.

thank you in advance


rtel wrote on Sunday, January 27, 2008:

In the second case you are using a const in the second parameter so this could be a linker problem.  In any case as you say it is unlikely to be a problem.  You did not say which compiler or processor you are using.