zeddie's blog

By zeddie, history, 7 days ago, In English,

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?

 
 
 
 
  • Vote: I like it
  • -19
  • Vote: I do not like it

»
7 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by zeddie (previous revision, new revision, compare).

»
7 days ago, # |
  Vote: I like it +16 Vote: I do not like it

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, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

go to -> Tools -> click on cancel build (else you can use shortcut to do the same)

»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

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, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This is what I have been exactly looking for. Thanks a ton!!!

  • »
    »
    3 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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?