My Sublime text is not showing any output, just showing finished time

I made a new sublime environment by following this link: https://www.geeksforgeeks.org/setting-up-sublime-text-for-cpp-competitive-programming-environment/
At first I run some simple i/o codes in c++. After running a tle program by mistake, it’s not showing any output.

You have to write these lines for input-output to work.
int main()
{
#ifndef ONLINE_JUDGE
freopen(“input.txt”, “r”, stdin);
freopen(“output.txt”, “w”, stdout);
#endif
/* Start Here*/

return 0;

}

Actually, I build a system file in which I don’t need to add a local judge.
check the link.

Make sure, the file.cpp, inputf.in, and outputf.out files are in the same directory.

It’s in the same directory. Actually, it is not working after running the tle program. Before that everything was good.

2 Likes

The same Problem Occurred With Me Alsoe So I Started To Use VSCode :sweat_smile:

1 Like

Bro any leads, was your problem solved, cause I’m also facing a similar problem

Just change your build sys

Try this. In the build-system file, enter the complete address of the input and output files (e.g., C://dir//dir//inputf.in).

1 Like

Resolved, so apparently, at the start sublime had some auto save feature and it got discontinued maybe an update or something, so I’ve to save my work to run it!

worked for me. Thanks!!

Just once delete input.txt and output.txt files from the folder where you have saved it, and again create them with the same name. And then reopen them in the sublime text window. Worked for me! :slight_smile:

3 Likes

Thank you sir.:pray:
This really worked for me. I was so confused what to do. Many comments were like -Add this file in build system…etc. But I didn’t know where will I find build system and I also didn’t know how to properly do that. Your solution was so simple. :blush:

this also worked for me.

I am having the same problem but print statements are getting outputted(not on outputf.in file) but input giving no response.