C'est juste l'utilisation d'un pointeur sur fonction:
#include <stdio.h>
typedef void (*pfunc)(int);
void displayInt(int a)
{
printf("Int est: %i\n", a);
}
int main()
{
pfunc func = &displayInt;
func(120);
(func)(90); /* ou on peut parenthésé */
return 0;
}
________________________________________________________________________
Historique de mes créations, et quelques articles:
[ http://0217021.free.fr/portfolio http://0217021.free.fr/portfolio]
Merci d'utiliser Réponse acceptée si un post répond à votre question