#: 8649 S3/Languages
08-Dec-90 15:44:43
Sb: #8640-'C' problem
Fm: Jim Peasley 72726,1153
To: Bruce MacKenzie 71725,376 (X)
Thanks Bruce, I've been tearing my hair out over this one. Originally, I was
trying to use strncpy, but found a caveat that I had overlooked : "if s2 is
longIr than s1, the string is not null terminated". Since s2 will always be
longer in my case, I thought I'd try memcpy and explicitly put a '\0' at the
end. Never occurred to me that strcat has to find the original '\0' in order
to know where to begin concatenating!
I'll try yours and Pete's suggestion in a bit and let you know.
Thanks,
...Jim
|