Mar 24, 2015 at 7:36pm Mar 24, 2015 at 7:36pm UTC
...
Last edited on Mar 31, 2015 at 6:48pm Mar 31, 2015 at 6:48pm UTC
Mar 24, 2015 at 7:44pm Mar 24, 2015 at 7:44pm UTC
you probably need to ignore any character in the input stream by using cin.ignore() just before the cin.getline() statement.
Aceix.
Mar 24, 2015 at 7:46pm Mar 24, 2015 at 7:46pm UTC
First of all. Why are you using a character array, and then keep saying string string string, instead of just using std::string
?
To fix your problem. Try putting a cin.ignore();
just above your cin.getline
Last edited on Mar 24, 2015 at 7:47pm Mar 24, 2015 at 7:47pm UTC
Mar 24, 2015 at 7:53pm Mar 24, 2015 at 7:53pm UTC
just put cin.sync()
on line 52.
Mar 24, 2015 at 8:16pm Mar 24, 2015 at 8:16pm UTC
Thanks, and noted for myself. I retract my suggestion.