Definition: 定義
occurs in only one place (只能出現一次)
specifies the type of an object; reserves storage for it; is used to create new objects
example:
1 |
int my_array[100]; |
Declaration: 宣告
can occur multiple times (可以出現多次)
describes the type of an object; is used to refer to objects defined elsewhere (e.g., in another file)
example:
1 |
extern int my_array[]; |
Leave a Reply