title | tags |
---|---|
Mac VSCode 寫 C/C++ 教學 |
computer |
- @angel-star 提供相關檔案
- 進入 VSCode 官網並下載
- 解壓縮後拖到應用程式
- 開啟 VSCode 選擇 Extenion
- 安裝 C/C++
- 安裝 C++ Intellisense
- 進入 repository 選擇 Clone or Download --> Download ZIP
- 或在終端機輸入
git clone https://github.com/liaojason2/vscode_template_for_Mac.git
- 下載完後進行解壓縮
- 隨便開一個資料夾
- 進入解壓縮後的檔案,在鍵盤上打
Command+Shift+.
檢視隱藏檔案,複製 .vscode 至剛剛隨意新增的資料夾內 - 開啟 VSCode
- 開啟剛剛隨意新增的資料夾
- 選擇 New File 新增檔案
- 撰寫程式
- 按
Command+Shift+B
進行編譯 - 按 Ctrl+Shift+` 開啟終端機
- 輸入 ./<檔名>.out 即可執行程式