C: Tips about typedef of Pointers to Functions
Tips about typedef of Pointers to Functions
typedef int ( * ( * arr2d_ptr ) ( ) ) [3][4] ; arr2d_ptr p ;
p is a pointer to a function returning a pointer to a 2-D int array.
typedef int ( * ( * ( * ptr2d_fptr ) ( ) ) [10] )( ); ptr2d_fptr p ;
p is a pointer to a function returning a pointer to an array of 10 pointers to function returning an int.
typedef char ( * ( * arr_fptr[3] ) ( ) ) [10] ; arr_fptr x ;
x is an array of 3 pointer to function returning a pointer to an array of 10 chars.
typedef float* ( * ( * ( * ptr_fptr ) ( ) ) [10] )( ); ptr_fptr q ;
q is a pointer to function returning a pointer to an array of 10 pointers to functions returning a float pointer.




Comments
Log in or create a user account to comment.