+ 1

Helped with this code (infinite loop problem) (code include)

the program that opens the text files and prints its contents on the screen, the user enters the name of the file to open. The problem arises when the user enters an invalid name to the first of the program the given that the opening was failed and decides to retry (enter 1 or true when asking if you want to retry), in case the user enters the name of an existing key file to display the program falls into a kind of infinite loop. https://code.sololearn.com/cv9TG47t6o3w/?ref=app

5th Sep 2017, 11:12 PM
Carlos Castillo
1 Resposta
0
Carlos I think your code is not working like you think. At least if you run in SL with your instruction exit(1); and new do the same but with instruction return EXIT_FAILURE; or return 0; you will be the difference
16th Sep 2017, 8:12 AM
Daniel
Daniel - avatar