I have installed mingw and sublime text3 yesterday by refering to this webiste
so i have done everything that mentioned in that site but output is not displaying in output file
can anyone please help
This is how my setup looks like
I have installed mingw and sublime text3 yesterday by refering to this webiste
so i have done everything that mentioned in that site but output is not displaying in output file
can anyone please help
This is how my setup looks like
Try replacing all the “.in” with “.txt”
i.e, #ifndef ONLINE_JUDGE
freopen(“inputf.txt”, “r”, stdin);
freopen(“outputf.txt”, “w”, stdout);
#endif
Also dont forget to replace the “.in” in the input and output file with “.txt”
Actually if you have created a new build system with the code mention in the site or i will mention mine,
{
“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”
}
Then you don’t need to write #ifdef thing
You only create two files name inputf.in and outputf.in and write your code .
This build system work for me try this !
If you are using windows use the following snippet
{
"shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c++",
"variants":
[
{
"name": "Run",
"shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\""
}
]
}