typedef struct
{
uchar current;
uchar up;
uchar down;
uchar enter;
void (*current_operation)(); //函數指針變量用來存放函數的地址
} key_table;
key_table code table[28]=
{
{0,24,8,1,(*fun0)},
{1,7,3,2,(*fun1)},
{2,2,2,1,(*fun2)},
{3,1,5,4,(*fun4)},
{4,4,4,3,(*fun5)},
{5,3,7,6,(*fun7)},
{6,6,6,5,(*fun8)}
}
本來想寫個12864多級菜單的程序,然后到圖中紅色區域的地方相當的不理解,疑問如下:
1.(*fun0)這種表示方法代表什么?為什么會這樣用,哪些知識記載這?(我查過好多資料,沒有見到這種寫法的)
希望大神能夠給予解答,如果能把索引解釋一下,就更好了,謝謝
|