
如果沒有對 Unit1 進行重新命名, 就會看到 Unit1 一共被儲存成下列三個檔案:
1. Unit1.cpp
副檔名為 cpp, 類型為 C++ Source File, 內容就是你在撰寫程式時, 所看到的程式內容。
2. Unit1.dfm
副檔名為 dfm, 內容其實就是對你所設計的 Form 之描述, 如果你用記事本開啟 Unit1.dfm, 你就可以看到 C++ Builder 是如何描述一個 Form 的。

由於上圖中的 Form1 並沒有任何元件, 所以描述內容僅有對 object Form1 的描述。
3. Unit1.h
副檔名為 h, 表示為一個 C 語言的標頭檔(header file), 每一個 Unit 都會搭配一個標頭檔, 在 Unit1.cpp 中, 你也可以找到一行 #include "Unit1.h" 的指令。
在你儲存的目錄中, 你一共可以看到如下圖的三個檔案。

No comments:
Post a Comment