TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRANK MASINGILL
from: NEIL HELLER
date: 1997-08-25 20:21:00
subject: MATHPLAY.CPP

FM>         cputs("Enter your choice: ");
FM>         scanf("%d", &i);
FM>         switch(i)
A person takes his life in his own hands when using scanf.  It's
perhaps THE most dangerous tool out there.  If you're making the
program for kids, then it won't be any time at all before one of them
presses a non-numeric character followed by Enter and hoses your
system.  I would advise using "cin >> i;"
 * KWQ/2 1.2i * 
--- TMail v1.31.5
---------------
* Origin: Diablo Valley PCUG-BBS, Walnut Creek, CA 510/943-6238 (1:161/55)

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