Title / Description
Code typedef struct MyObject MyObject; struct MyObject { void (*action)(int, char*); }; static void my_object_action(int i, char *s) { printf("%i: %s\n", i, s); } MyObject* my_object_new(void) { MyObject *my = malloc(sizeof(MyObject)); my->action = &my_object_action; return my; }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code