I thought line 18 or 19 would solve the problem, but the problem is not there.
If I replace line 18 and 19 with file.close(); file.open("file.txt") it works and it prints the content of the file infinitely.
So, where is the problem ?
Thanks in advance :)