Higher-order functions: Difference between revisions
Content deleted Content added
→Complex example: Removed syntax highlighting |
→Pointer: Removed syntax highlighting |
||
Line 66: | Line 66: | ||
Finally, declaration of a pointer variable of the proper type to hold such a function as myFunc: |
Finally, declaration of a pointer variable of the proper type to hold such a function as myFunc: |
||
<highlightSyntax language=C> |
|||
int* (*funcPointer)( double* (*funcParameter)(long* parameter) ); |
int* (*funcPointer)( double* (*funcParameter)(long* parameter) ); |
||
Line 72: | Line 71: | ||
funcPointer = myFuncComplex; |
funcPointer = myFuncComplex; |
||
</highlightSyntax> |
|||
Of course, in a real project you shouldn't write such a convoluted code, but use some typedef instead, in order to break complexity into steps. |
Of course, in a real project you shouldn't write such a convoluted code, but use some typedef instead, in order to break complexity into steps. |