TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DAVID VAN HOOSE
from: TOM TORFS
date: 1998-04-04 13:21:00
subject: reading input from stdin (was: I`m an id13:21:3304/04/98

David Van Hoose wrote in a message to Tom Torfs:
DVH> char name[40];
DVH> gets(name);
DVH> name[40]='\0';
TT> That still leaves the problem that you're writing to memory that
TT> isn't yours. Your array is only 40 characters long and you try to
TT> access the 41st element!
 DVH> Actually it is correct.
No it isn't correct. I've said twice why (one of which is quoted above), as 
have other people, I'm not going to repeat it once more.
greetings,
Tom
tomtorfs@village.uunet.be
--- timEd/2 1.10+
---------------
* Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516)

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