I am using Sublime Text 3 in Windows 10. I am trying to output a simple program in an output file. Earlier it was working fine, but now it is giving some strange alphanumeric characters as output whenever I am trying to output something.
Here's my build profile:
{
"cmd": ["g++.exe","-std=c++17", "${file}", "-o", "${file_base_name}.exe", "&&" , "${file_base_name}.exe<inputf.in>outputf.in"],
"shell":true,
"working_dir":"$file_path",
"selector":"source.cpp"
}
Sample input
#include <iostream>
using namespace std;
int main() {
for (int i = 0; i < 10; i++) {
cout << i << endl;
}
}
Output:
300d 0a31 0d0a 320d 0a33 0d0a 340d 0a35
0d0a 360d 0a37 0d0a 380d 0a39 0d0a
It happened with me also; I use C++14 in sublime text 3.
I would suggest to delete your sublime build file and create the same again, and your "inputf.in" and "outputf.in" files should be present in the same folder.
There's a common confusion, as we copy the sublime build file from somewhere and there may be different file names for input and output files, so match them with yours, otherwise you'll get an error - "system can't find file specified".