Hey Everyone,
I need a help, actually I’m using Sublime text 3 for competitive programming for a long time and for me, it’s the best code editor ever.
I use C++ language for coding. Suddenly it started showing some irrelevant values in output file.
#ifndef ONLINE_JUDGE freopen("inputf.in", "r", stdin); freopen("outputf.in", "w", stdout); #endif
As we know, we use the above code while coding in editor in our local machine( for C++). previously I didn’t used that code yet my all programs ran perfectly.
Since the problem occurred it started showing something like, even it’s a hello world program.
Code Sample
#include< iostream>
using namespace std;
int main()
{
cout<<“Hello, world”;
return 0;
}
Output
4865 6c6c 6f2c 2077 6f72 6c64
As of now if I include the following stuff,
#ifndef ONLINE_JUDGE
freopen(“inputf.in”, “r”, stdin);
freopen(“outputf.in”, “w”, stdout);
#endif
in main function, then it stops showing the output now.
It’s a great problem for me since this I’m unable to code. I searched on Google yet I couldn’t get any solution. so I’m depend on the community please help asap.