vscode-code-runner icon indicating copy to clipboard operation
vscode-code-runner copied to clipboard

Modified the Executor Map Input for C and C++

Open KrishnenduDG opened this issue 3 years ago • 1 comments

Modified the Executor Map Input for C and C++ , so that the .exe file created during the process gets destroyed immediately after the program is run.

KrishnenduDG avatar Nov 28 '21 08:11 KrishnenduDG

It would be better,

"code-runner.executorMap": {
		"c": "cd $dir & gcc -std=c17 \"$fileName\" -o \"$fileNameWithoutExt\" & ./\"$dir$fileNameWithoutExt.exe\" & del \"$dir$fileNameWithoutExt.exe\"",
            "cpp": "cd $dir & g++ -std=c++17 \"$fileName\" -o \"$fileNameWithoutExta.exe\" & ./\"$dir$fileNameWithoutExt.exe\" & del \"$dir$fileNameWithoutExt.exe\"",
},

There is problem with && operator in windows powershell, so it woould be better to have & or | operator. Also this is more flexible with the version specifier for c & c++ & filename with spaces.

Ok Agreed with that

KrishnenduDG avatar Jan 01 '22 17:01 KrishnenduDG