Sublime Forum

Output.txt is giving absurd output

#1

when I remove the following snippet, it gives correct output in the terminal.

#ifndef ONLINE_JUDGE
freopen(“input.txt” , “r”, stdin);
freopen(“output.txt” , “w” , stdout);
#endif

how to troubleshoot this?

0 Likes

#2

The Sublime Text build environment is not a terminal device and fiddling with the stdio streams is generally not going to work as expected. Try the Terminus plugin instead.

1 Like

#3

I deleted both input.txt and output.txt file from parent directory and then created input.txt and output.txt file again and now it’s working fine.

0 Likes