Блог пользователя zeddie

Автор zeddie, история, 4 года назад, По-английски

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
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
4 года назад, # |
  Проголосовать: нравится +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.

»
4 года назад, # |
  Проголосовать: нравится 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