Re: different max_structs – using the same method – polymorphism

Hi,

One way is to define a custom object structure to encapsulate the max t_object structure (as in the quick flop external i join below to illustrate the idea).

typedef struct _ob {
 t_object o;
 long key;
 } t_ob;

typedef struct _flop {
t_ob ob;
void *outlet;
} t_flop;

HTH

Attachments:
  1. flop.c
Oct 9, 2012 at 4:09pm #231763