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)
|