문법.

컴퓨터이야기/C 2006. 11. 23. 23:12
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

1) char *(*(*a[N])())();
2) typedef char *pc;      /* pointer to char */
   typedef pc fpc();      /* function returning pointer to char */
   typedef fpc *pfpc;     /* pointer to above */
   typedef pfpc fpfpc();  /* function returning... */
   typedef fpfpc *pfpfpc; /* pointer to... */
   pfpfpc a[N];           /* array of... */
3) cdecl> declare a as array of pointer to function
   returning pointer to function returning pointer
   to char
   char *(*(*a[])())()


plotpoint((struct point){.x = 1, .y = 2});


   #define offsetof(type, mem) ((size_t) \
       ((char *)&((type *)0)->mem - (char *)(type *)0))
Posted by 백구씨쥔장
,