### zeddie's blog

By zeddie, history, 7 days ago, ,

I am using the sublime editor for running my code on my machine. And I am using File I/O like this:

#ifndef ONLINE_JUDGE freopen("/home/zeddie/Documents/input.txt","r",stdin); freopen("/home/zeddie/Documents/output.txt","w",stdout); freopen("/home/zeddie/Documents/error.txt","w",stderr); #endif __

#### PROBLEM: Sometimes when I do some error in my program that leads to an infinite loop, then my programs produce infinite output and programs keeps on running and my system starts lagging. Only option I have now is to reboot my machine.

Can anyone help me with this?

• -19

 » 7 days ago, # |   0 Auto comment: topic has been updated by zeddie (previous revision, new revision, compare).
 » 7 days ago, # |   +16 Go to Preferences -> Key Bindings, then add [ { "keys": ["ctrl+alt+b"], "command": "cancel_build" } ] on the right. Then you'll be able to press ctrl+alt+b to cancel your build.
•  » » 6 days ago, # ^ |   0 It worked, Thank you so much! :-)
 » 6 days ago, # | ← Rev. 2 →   0 go to -> Tools -> click on cancel build (else you can use shortcut to do the same)
•  » » 6 days ago, # ^ |   0 Thanks Bro!!
 » 4 days ago, # |   0 You can create a new build system in sublime. You can refer to this build system that allows you to set a custom timeout.Github Repo
•  » » 3 days ago, # ^ |   0 This is what I have been exactly looking for. Thanks a ton!!!
•  » » 3 days ago, # ^ |   0 I'm getting this error by using this build system "ERROR: Invalid syntax. Default option is not allowed more than '1' time(s). Type "TIMEOUT /?" for usage." Any idea about it how to resolve?
•  » » » 3 days ago, # ^ | ← Rev. 2 →   0 Which OS are you using ? sj.shivam25
•  » » » » 3 days ago, # ^ |   0 windows