There are a lot of handling EOF answers, but their solutions are to break while loop and stop the program when see EOF. But what i want is that user input EOF (control + D), my program can flush it and ask user to input again.
Asked
Active
Viewed 55 times
0
-
1The problem is that the input may be coming from a file, and not from a user. – user3386109 Apr 14 '16 at 06:01
-
please write a repo case or short code to explain your problem better. – Anurag Apr 14 '16 at 06:54
-
You can use `read`, which is much low level, but lets you manage the input as you want. – Boiethios Apr 14 '16 at 07:40