*:取值(dereference operator),value of ... (eq.*b:value of b)
各種用法解說:
char *ptr; //char表示point指向變數的類型,唸做:ptr is a pointer to char
char p[5]; // p is a 5-element array of char
char *p[5]; // p is a 5-element array of pointer to char
char (*p)[5]; // p is a pointer to a 5-element array of char
另一種解釋
int *ptr[10];
This is an array of 10 int* pointers
int (*ptr)[10];
This is a pointer to an array of 10 int
typedef void (*func)(char);
func是個指標,指向某個函式,而這個涵式有一個資料型態為char的引述,回傳值為void
示意圖:
指標
雙重指標(a pointer to a pointer)
神奇指標用法
What's the meaning of 'char (*p)[5];'?
http://blog.nutpan.com/2016/07/run-programs-directly-from-your-blog-or.html
沒有留言:
張貼留言