#define a 0
#define b 1
#define c 2
#define d 3
#define e 4
value[a] = 0;
value[b] = 0;
value[c] = 0;
value[d] = 0;
value[e] = 0;
或建立兩個陣列來對照名稱
name[0] = "a";
name[1] = "b";
name[2] = "c";
name[3] = "d";
name[4] = "e";
value[0] = 0;
value[1] = 0;
value[2] = 0;
value[3] = 0;
value[4] = 0;
------------------------------------------------------------------------
2.function pointer
void *a :可存放任何資料型態的地址
void functionA(int a);
void *b = functionA;
所以 functionA(c); = b(c);
沒有留言:
張貼留言