Compiler(GCC)
1. Linux
gcc is built in, type gcc -v
to check
2. Windows
you may need to install TDM-GCC
3. Mac
I don't have Mac, hopefully this will work
Editor (VSCode)
1. install code-runner
2. configure code-runner
- open Files -> Preferences -> Settings
- search for code-runner
- change code
"c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
to
"c": "cd $dir && gcc -Wall -Werror $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
- change code
"code-runner.runInTerminal": false
to
"code-runner.runInTerminal": true
3. press Ctrl+Alt+N to run code

网友评论