I need to append one character from C-style String X (not necessarily the first char) to C-Style String Y. I was thinking of doing it thusly (this is in a for loop):
where Y[i] is the char to copy. Two questions:Code:
strncat(X, Y[i], 1)
1. Will this work?
2. Is there a better way?