TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JASON LAVOIE
from: THOMAS MAEDER
date: 1997-09-21 16:09:00
subject: string input

JL> char testvar[100];
JL> cin >> testvar;
JL> how come I only get the first word?
Because the stream input operator for char * is supposed  to  do  just
that.
Look  at  the  getline()  method  of class istream if you want to read
longer strings.
Thomas
---
 þ MM 1.0 #0113 þ Conspiracy theories are all secret plots to confuse us.
---------------
* Origin: McMeier & Son BBS (2:301/138)

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