+ 1

C++ need help

I have this code: https://code.sololearn.com/cf3cPF6iPUhp/#cpp In the switch case 5 I want to print a txt but it only gives me the first line in the output

18th Oct 2017, 3:15 PM
Lautaro Segura
Lautaro Segura - avatar
4 Answers
+ 5
By looking at the code, it seems you close the file file after the data is read from the file just once. Put the .close() call out of the loop, after it, and let me know if it worked.
18th Oct 2017, 5:20 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 8
The switch cases can be combined
18th Oct 2017, 3:21 PM
👑 Prometheus 🇾🇬
👑 Prometheus 🇾🇬 - avatar
+ 8
combine the switches as one. you can't treat a switch like an if statement.
18th Oct 2017, 5:19 PM
Germain F
Germain F - avatar
0
no because it gives me an error
18th Oct 2017, 3:22 PM
Lautaro Segura
Lautaro Segura - avatar