TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: BILL BIRRELL
from: DARIN MCBRIDE
date: 1998-03-12 07:57:00
subject: Avoid disaster

 BB> Darin,
 >  JD>      char string[4];
 >  JD>      string="OUCH";
DM > You mean:
DM >   strcpy(string, "OUCH");
 BB>     No. "OUCH" is 5 chars long; string[] is four. Quart 
 BB> into pint pot syndrome.
 > The operator = won't work here.
 BB>     True, but nothing at all will cope with these circumstances. :-)
Bill, you have to read the rest of the message I was responding to: the point 
of the excercise was to find out why C wasn't doing that protection, so we 
had to leave in the bad code for that purpose.  However, it still had to be 
compilable code...
---
---------------
* 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™.