프로젝트 루트 디렉토리에 Out 만들고 실행
단축키는 ctrl + shift + r
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Out",
"type": "shell",
"command": "g++",
"args": ["-g", "${file}", "-o", "${workspaceFolder}/Out"]
},
{
"label": "Run Out",
"type": "shell",
"command": "${workspaceFolder}/Out"
},
{
"label": "Build and Run",
"dependsOn": ["Build Out", "Run Out"],
"dependsOrder": "sequence"
}
]
}
keybindings.json
{
"key": "ctrl+shift+r",
"command": "workbench.action.tasks.runTask",
"args": "Build and Run"
}
snippets
{
"C++ PS Boilerplate": {
"prefix": "ps_init",
"body": [
"#include <bits/stdc++.h>",
"using namespace std;",
"#define fastio cin.tie(0)->sync_with_stdio(0)",
"using ll = long long;",
"using pii = pair<int, int>;",
"using pll = pair<ll, ll>;",
"",
"int main() {",
" fastio;",
" $0",
" return 0;",
"}"
],
"description": "c++ ps 보일러플레이트 코드"
}
}