TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: MANISH MALIK
from: JAVIER KOHEN
date: 1998-02-05 01:14:00
subject: C++ Saveding stuff

On 31-Jan-98, Manish Malik wrote to Anthony Tibbs about C++ Saveding stuff.
 MM>>> char s[40]; gets(s); puts("\r\nThis was the string you entered :
 MM>>> "); puts(s);
 AT>> NO!  Never!  Bad!    You've allocated 40 bytes, but
 AT>> the user could easily type 4000.
 MM> okay, hows this piece of code ?? char *s; gets(s); puts("\r\n
 MM> Whether you typed 40 or 4000, I have it all ! Here - "); puts(s);
WORSE!!! Your "new" method can't even take one character, as s points to
nooneknowswhere...
Hint: fgets should be nice to look up at the help.
Javier Kohen >jkohen@tough.com< [The_Crusher] http://jkohen.base.org
     +4:900/748.3+ _200:201/126_ ICQ:#3855350# PGPID:*3423EAA9*
.!. Let's start a war... (said Maggie one day) * The Exploited
--- Terminate 5.00/Pro 
---------------
* Origin: The King of The Ring (4:900/748.3)

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