0

Need help again. Output of this code "eats" word

I want to enter the text and write it to a file, then take it from the file and output to the screen. https://code.sololearn.com/c7ObKVRWMYY2/?ref=app

21st May 2018, 6:35 AM
FairSuspect
FairSuspect - avatar
2 odpowiedzi
+ 2
In line 8 you get input with cin that store in msg var but on line 9 you get another input (with cin.getline) and overwrite msg var value.... In this way first word is alway overwrited... Remove/comment line 8
21st May 2018, 8:07 AM
KrOW
KrOW - avatar
0
I want to enter the text and write it to a file, then take it from the file and output to the screen.
21st May 2018, 6:48 AM
FairSuspect
FairSuspect - avatar