TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: Bruce MacKenzie 71725,376 (X)
from: Jim Peasley 72726,1153
date: 1990-12-08 15:44:43
subject: #8640-`C` problem

#: 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

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.