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

How do I run C code with -std=c99?

Open salmanmkc opened this issue 6 years ago • 1 comments

Just wondering how to do this, great extension

salmanmkc avatar Oct 16 '19 19:10 salmanmkc

just make some changes in setting.json file. Change c99 to whichever versoin you want.

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

lokesh-kurre avatar Dec 15 '21 20:12 lokesh-kurre