不知道大家第一次考 APCS 實作題順不順利,作者第一次考實作題就花了快一個小時摸索環境和 Code::Block 如何操作,雖然考前有老師簡單教學過,但到了現場還是會手忙腳亂,畢竟不是熟悉的作業系統和習慣的 IDE。
本篇教學將會教學如何快速的使用 Code::Blocks 新增檔案以及執行程式,讓就算是第一次去考 APCS 的您也不會手忙腳亂,額外補充如何安裝從官網提供的虛擬環境,讓大家在家就可以熟悉一下 APCS 的系統。
一、APCS 系統環境:
作業系統: Linux Ubuntu
支持語言: C、C++、Python2、Python3、Java
可用程式軟體: vi/vim、Eclipse、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 →
二、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 →
Windows 和 Linux 的 Code::Blocks 操作上並無差異,只有儲存檔案和終端機的畫面會因為作業系統而長得不一樣。
-
APCS 有規定 Code::Blacks 的版本,所以需要特別安裝 17.12 版本會比較好熟悉,點選 codeblocks-17.12-setup.exe 下載安裝檔。
連結:
https://sourceforge.net/projects/codeblocks/files/Binaries/17.12/Windows/
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 →
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 →
-
點選 New file 按鈕,按 Empty file 即可新增一個空白檔案。
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 →
-
點選 Save 按鈕或者按存檔快捷鍵 ctrl + s,打上 P1.cpp
(根據 APCS 命名規則),即可開始撰寫程式。
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 →
-
點選 Build and run 按鈕,就可以編譯程式並且執行程式。
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 虛擬環境建置:
-
下載虛擬環境需要的 ISO 檔,APCS 官網提供,安全性不用擔心。
連結:
https://drive.google.com/uc?id=1uQrzIYiW0GA9ZwHY_Rrnqp9qKzV4Eewd&export=download
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 →
-
下載 VirtualBox,運行虛擬環境必要的軟體。
連結:
https://www.virtualbox.org/wiki/Downloads
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 →
-
開啟 VirtualBox,點選新增按鈕。
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 →
-
自由輸入虛擬環境的名字,類型選擇 Linux 系統,版本選擇 Ubuntu(64-bit)。
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 →
如果沒有顯示 (64-bit) 的選項,代表 CPU 虛擬化功能沒有開啟,需要到 BIOS 中設定。
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 →
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 →
-
選擇第一步驟下載回來的 ISO 檔,然後點選 Mount and Retry Boot。
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 →
如果覺得這篇文章有幫助的話,可以幫作者多多分享,讓我能夠幫助更多寫 C++ 的學生能夠在第一次考 APCS 實作題就能開始快速撰寫,不會再因為不熟悉的環境而拖累寫程式的進度。
Copyright © 2023 SmallShawn95. All rights reserved.