I’m trying to setup an environment suggested on Striver’s VSCode setup for DSA and CP.
After completing all the steps, I’m not able to get any output and I get the below error message in the terminal:
This is my tasks.json:
{
"version": "2.0.0",
"tasks": [
{
"label": "Compile and run",
"type": "shell",
"command": "",
"args": [
"copy",
""${file}"",
"${workspaceFolder}\jspwTest.cpp",
"&&",
"g++",
"jspwTest.cpp",
"-o",
"jspwTest",
"&&",
"jspwTest",
"<",
"input.txt",
">",
"output.txt",
"&&",
"del",
"jspwTest.exe",
"&&",
"del",
"jspwTest.cpp"
],
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true,
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
"regexp": "^(.*):(\d+):(\d+):\s+(warning|error):\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
]
}
This is the path of my compiler – "C:msys64ucrt64bing++.exe"
.
I tried replacing the tasks.json
thinking I might have copy/pasted something wrong, but this didn’t work. The task.json
is the same as the one given in the “Take U Forward” link.
nelly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2