TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: IDO RAZON
from: DARIN MCBRIDE
date: 1997-09-05 18:01:00
subject: stream bug???

 IR>    Cameron Clark, All, 25 Aug 97, 08:51 
 CC>     char string[6];
 CC>     strcpy(string,"12345");
 CC>     string[strlen(string)] = '\n';
 IR>  Somebody already answered your question, but I also 
 IR> wish to note that your
 IR> code is broken, because it removes the string's terminating zero.
I was going to point that out, too.  However, his code isn't broken.  
Although his code says "string" it isn't used as a normal string after the 
point he kills his terminating zero.  It's used as a buffer, and buffers 
don't have termination.
--- Maximus/2 3.01
---------------
* Origin: Tanktalus' Tower BBS (1:250/102)

SOURCE: echomail via exec-pc

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™.