Here are some bits of information
Code:
#include <stdio.h>
// forward declaration for structure
struct my_struct;
// a pointer to a print function, taking a ptr to an instance
typedef void (*printfn)( struct my_struct *instance );
// a structure, containing a ptr to a function to print it
typedef struct my_struct {
int a;
char b; // member variables
printfn print; // member functions
} my_struct;
void my_print_function ( my_struct *inst ) {
printf( "%d %c\n", inst->a, inst->b );
}
int main ( ) {
my_struct fred = {
1, '2', my_print_function
};
fred.print( &fred );
return 0;
}
Though it looks to me like C++ would be better for you.