TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JASON LAVOIE
from: PAUL WANKADIA
date: 1997-09-23 20:03:00
subject: string input

On 21 Sep 97, Jason Lavoie wrote to Paul Wankadia --
 PW>  JL> char testvar[100];   cin >> testvar;
 PW>  JL> how come I only get the first word?
 PW> It stops reading when it hits whitespace, IIRC.
 JL> thanks, but is there any way to input a string with spaces in it?
 JL> (all into the same variable)
Try 'cin.getline()' or something like that.
--- PPoint 2.00
---------------
* Origin: Junyer's Workshop (1:342/1022.2)

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