Sublime Forum

Incorrect/ garbage value as output

#1

I use this template in my main file to give input and get output to my code. It used to work fine until one day it started giving issues in input reading and output writing. Can someone help me resolve this

**Input**
int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output1.txt", "w", stdout);
    #endif

    string n="hello";
    cout<<n;
}

**Output**
6865 6c6c 6f
0 Likes

#2

Looks like the output panel is using the “Hexadecimal” encoding that’s meant for binary data. Does it happen in safe mode?

0 Likes