Thursday, September 18, 2008

array of N pointers to functions returning pointers to functions returning pointers to characters

How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters? 

Answer*:-
If you want the code to be even slightly readable, you will use typedefs. 
typedef char* (*functiontype_one)(void);
typedef functiontype_one (*functiontype_two)(void);
functiontype_two myarray[N]; //assuming N is a const integral 

Answer**:-

char* (* (*a[N])())()
Here a is that array. And according to question no function will not take any parameter value.

No comments:

Post a Comment

Thanks to given comments.......

My Blog List