Does anyone know how to write a callback function in C? I know what they do but have no idea how to write one. What I'm hoping to do is create a struct and have a pointer to a function contained in it. struct something { (...) /* stuff here */ (void*) my_function_pointer; (...) /* other stuff here */ }; I am not sure if this is the proper syntax. Basically there will be many instances of this struct and I wanna have a callback function for each one and that function will be custom for each instance of the struct. I hope that makes some kind of sense.