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?
↵
↵
↵
_#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?