How to avoid infinite loop in sublime text 3 ???

Revision en1, by mcGyver, 2021-04-28 08:44:59

I have recently start coding in sublime text 3.

I use freopen("input.txt", "r", stdin); and freopen("output.txt", "w", stdout); to get input from input.txt and print output in output.txt.

But whenever my code falls into a infinite loop it stop responding and the program crashes as the size of the output.txt file bocomes so large.

Is there any way to avoid this? I mean can I set a file size limit or something like that?

[p.s: I have heard about terminus but I cannot make it work in my windows 10 os, so I had to use file io method. If anyone using terminus on windows 10, I would be so grateful if you share how you did make that possible too.]

Tags sublime text 3, infinite loop, terminus

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English mcGyver 2021-04-28 08:45:47 1 Tiny change: 'op it stop respondin' -> 'op it stops respondin'
en1 English mcGyver 2021-04-28 08:44:59 737 Initial revision (published)