前言
Code::Blocks 是 APCS 在使用的 IDE
因此儘管平時練習可能不會使用到他
還是會需要稍微了解一下操作
免得到時候考試了卻因為不會使用 Code::Blocks 在那邊卡了整整一個下午
但也由於這篇只是要說明操作而已
並不會有下載、更改外觀這些教學
使用
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
一開始的畫面應該會長得像是這樣
找到上面的 File
New
Project...
後
應該會出現如下的畫面
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
接下來在左側的那一欄找到 File
Empty file
按下 Next>
之後 應該會出現以下的畫面
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
然後點擊畫面中紅色的那裏
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
可以選擇要存取的位置
至於要存取在哪裡的話
在 APCS 那裏他會有一個 backup
資料夾
可以將檔案存取在那裏
他會自動備份到小主機上 這樣如果臨時要換電腦或是其他東西的話就可以復原
存在 backup
資料夾也是最穩妥的方式
在檔案名稱那裏打上檔案名字 + 副檔名 .cpp
名字的話 APCS 有規定程式檔案須依照題目要求命名
這一步非常重要
加上副檔名之後才可以確認自己的檔案是cpp檔
不然我沒記錯的話他應該是會變成 .txt檔 也就是純文字檔
而純文字檔是沒有辦法編譯的
都弄好的話應該就會是這樣了
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
然後就直接按 Finish
就好了
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
然後就可以開始打 code 啦!
簡單打一下確定他會變色
然後按下 F9
編譯並執行
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
就可以了!
一些常用的快捷鍵
F9
是 Compile and Run
Ctrl
+ Shift
+ N
是 Create Empty File
這個方法創建出來的新檔案是不會有任何副檔名的 在存檔的時候順便打上副檔名就可以正常操作了
而且這個方法會比剛才那個方法快上不少
Ctrl
+ S
是 Save File
但直接 按 F9
的話如果沒有先存檔他也會叫你先存檔
Ctrl
+ O
是 Open File
後話
雖然編譯器的使用方法大致上來說都是相同的
可能沒有那麼必要去特地寫一篇教學
但 Code::Blocks 真的是非常麻煩
我一開始碰到的時候就因為一堆英文加上選項甚麼的都很多
儘管有很有耐心的助教一步一步告訴我怎麼弄
但我還是用到很崩潰然後就直接放棄了
(雖然到考試當天才發現操作其實蠻直觀的就是了
而且我自己就有朋友因為到了考試當下才發現自己其實不會用 Code::Blocks
一題都寫不出來
最後實作只拿了一級分
所以讓我意識到了寫這份教學的重要性
雖然可能不是很詳盡就是了 但一般的使用是絕對沒有問題的
最後也祝大家 APCS 順順利利!
不要把身分證弄丟導致差點進不去考場 (真人真事