// Example code from // http://www.huronbox.com/~james/techdemos/cs-callback.html #include static const char*(*func)(void); void set_cb(const char*(*f)(void)) { func = f; } void call_cb() { printf("%s\n", (*func)()); }