TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALL
from: PHIL OHL
date: 1998-03-18 17:12:00
subject: I`m an idiot

I am fairly new at C++ and i have encountered a pretty major problem
(I've had several).  Anyway, I know that you cant use 'cin' if there is
going to be spaces withing your input and I have learned to use
'getline' in its place. However 'getline' doesn't work all the time
either especially when i do something like:
char name[20];
cout<<"Enter name: ";
getline(name, cin);
It just wont work.  How would I remedy this problem without limiting the
user to just their first or last name.
I know its a very novice problem but I just don't know.
Thank you in advance,
Phil
--- ViaMAIL!/WC4 v1.30 
---------------
* Origin: A Mind Forever Voyaging * (806)794-3778 * Lubbock,TX (1:3804/180)

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