TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: MANISH MALIK
from: ANTHONY TIBBS
date: 1998-01-29 17:34:00
subject: C++ Saveding stuff

MM> words.
MM> e.g.
MM> char s[40];
MM> gets(s);
MM> puts("\r\nThis was the string you entered : "); puts(s);
NO!  Never!  Bad!    You've allocated 40 bytes, but the user 
could easily type 4000.
use:
char s[40];
fgets (s, 40, stdin);
printf ("\n\nThis was the string you entered: %s\n", s);
--- PointEd 2.0
---------------
* Origin: The Tibbs' Point - Ottawa, Ontario, Canada (1:163/215.38)

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