1 2 3 struct _Object; 4 typedef struct _Object Object; 5 6 void Object_init(Object *this); 7 8 struct _Object{ 9 unsigned int id; 10 void (*init)(Object*); 11 } obj ={0,&Object_init}; 12 13 void Object_init(Object *this){ 14 15 } 16 17 int main(int argc, char *argv[]) 18 { 19 20 Object Obj; 21 Obj.id=1; 22 return 0; 23 } 24
You need to create an account or log in to post comments to this site.