Wednesday, Jan 17th

Last update12:59:40 PM GMT

Can we declare a function that can return a pointer to a function of the same type?

Write e-mail

We can do it but not directly. There are 2 ways

argaiv1077

1. have the function return a generic function pointer, with proper casts to adjust the types as the pointers are passed around

2. have it return a structure containing only a pointer to a function returning that structure.

Share this post



Web Hosting