How to Concatenate 2 C strings, without overwriting any terminating Null characters?
Posted
by Ben313
on Stack Overflow
See other posts from Stack Overflow
or by Ben313
Published on 2010-06-14T16:28:37Z
Indexed on
2010/06/14
16:32 UTC
Read the original article
Hit count: 159
c
|string-manipulation
Hello,
I am trying to set up a list of file names for a parameter to SHFileOperation. I want to be able to concatenate a file name onto the char array, but i dont want to get rid of the terminating character. for example, I want this:
C:\...\0E:\...\0F:\...\0\0
when i use strcat(), it overwrites the null, so it looks like
C:\...E:\...F:\...0\
Is there any easy way to do this? or am i going to have to code a new strcat for myself?
© Stack Overflow or respective owner