I am implementing callback functions in this way:
typedef void (*callback)()
Its works fine and i can pass arguments to such callbacks:
void Call(int X){
printf("Input: %d", X);
}
void PrintSomething(callback F){
printf("Something");
F(10);
}
But i can not shake the feeling that I am doing something wrong. Is my method memory safe ? Is any other good method for implementing callbackfunctions with parrameters ?