上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
Batman
註冊時間: 2003-11-15 文章: 348
第 1 樓
|
發表於: 星期四 十月 09, 2014 10:53 am 文章主題: 請問如何使用#include 檔案名.h 才可以在每個Method內使用 |
|
|
請問如何使用#include 檔案名.h 才可以在每個Method內使用, 而不用在每個Method內再#include 一次? |
|
回頂端 |
|
|
55812296
註冊時間: 2012-09-19 文章: 49
第 2 樓
|
發表於: 星期四 十月 09, 2014 2:39 pm 文章主題: |
|
|
開啟form 於工具列 FORM >INCLUDE FILE
但PRG 好像每個都需#INCLUDE
請教先進 多使用 #DEFINE 除程式快速外 有何其他好處 |
|
回頂端 |
|
|
saint
註冊時間: 2003-07-14 文章: 211
第 3 樓
|
發表於: 星期四 十月 09, 2014 3:36 pm 文章主題: |
|
|
You can use the #DEFINE and #UNDEF preprocessor directives to create compile-time constants in programs. By creating constants with #DEFINE instead of using variables, you can reduce memory consumption, increase performance, and simplify programs.
from MSDN
你重點都說完了呀!
還有減少記憶體的使用 |
|
回頂端 |
|
|
Batman
註冊時間: 2003-11-15 文章: 348
第 4 樓
|
發表於: 星期五 十月 10, 2014 2:47 pm 文章主題: |
|
|
謝謝55812296回覆, 請問如何包含多個 #include files, 在FORM >INCLUDE FILE 好像祗能包含一個檔案 |
|
回頂端 |
|
|
elleryq
註冊時間: 2007-06-21 文章: 768
第 5 樓
|
發表於: 星期五 十月 10, 2014 11:12 pm 文章主題: |
|
|
.h 裡也可以寫 #include
all.h
#include <a.h>
#include <b.h>
....
your program
#include <all.h>
.... |
|
回頂端 |
|
|
Batman
註冊時間: 2003-11-15 文章: 348
第 6 樓
|
發表於: 星期六 十月 11, 2014 10:36 am 文章主題: |
|
|
哦, 真笨...^^, 搞定了, 謝謝 elleryq 幫助 |
|
回頂端 |
|
|
|