d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > C++ Structures
Add Reply New Topic New Poll
Member
Posts: 59
Joined: Jul 27 2012
Gold: 0.00
Oct 27 2013 01:57pm
Hey guys, i'm having a reaaaaallllly weird problem with my code: http://pastebin.com/YurFCAVA
(Here is my assignment, number 3 ( http://i.imgur.com/Bpd2CwN.jpg )

Anyway, lines 51-52 are not working at all. After i input the time, the program just ends http://i.imgur.com/Lhg7Hzs.png and it never lets me input the description, yet when i omit lines 36-49 as comments, only then does it let me input the description ( http://i.imgur.com/XHdJOBo.png ).

This post was edited by Bobbie50 on Oct 27 2013 01:58pm
Member
Posts: 6,192
Joined: Dec 13 2010
Gold: 6,669.99
Oct 27 2013 03:41pm
sometimes with cin or getline, if you place 2 in a row, the second one will take the "enter key" that you pressed in the first one.
To bypass this, put a cin.get(); in the middle of them.

Let me know if it works. :)
Member
Posts: 59
Joined: Jul 27 2012
Gold: 0.00
Oct 27 2013 06:30pm
Heck yes it worked, thank you! http://i.imgur.com/vE09L5M.png

This post was edited by Bobbie50 on Oct 27 2013 06:32pm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll