+ 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
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.
+ 8
The switch cases can be combined
+ 8
combine the switches as one. you can't treat a switch like an if statement.
0
no because it gives me an error