+ 1

Why does the cursor jump straight to address and not name ?

https://code.sololearn.com/crDINRXl8QoL/?ref=app

28th Feb 2018, 2:27 AM
Timew2
Timew2 - avatar
5 Réponses
+ 5
This is as getline is always skipped when a cin>> call precedes it, as the cin>> call leaves a newline in the buffer which skips getline as well. Just add the following before your getline call : cin.ignore(); This deletes the last character from the buffer. https://www.sololearn.com/discuss/372045/?ref=app
28th Feb 2018, 2:56 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
Also , I'm using the DEV C++ complier to do it
28th Feb 2018, 2:42 AM
Timew2
Timew2 - avatar
+ 1
Thank you but I'm not done yet For the name I just declared a variable..... String name;
28th Feb 2018, 2:44 AM
Timew2
Timew2 - avatar
+ 1
Alright, Thanks . can I send you the assignment so you can have an idea of what doing ?. email ? (fast and easy
28th Feb 2018, 2:53 AM
Timew2
Timew2 - avatar
+ 1
kudos. it worked
28th Feb 2018, 3:06 AM
Timew2
Timew2 - avatar