次のスキームを想定します。
/* avl.c */
typedef struct avl {
void *data;
int height;
struct avl *left, *right;
} node;
/* avl.h */
struct avl; /* opaque */
使いたい:
struct node *root;
それ以外の
node *root;
avl.cで、しかし今のところ私が見つけた最高のものは次のとおりです。
struct avl {
void *data;
int height;
struct avl *left, *right;
};
#define node avl
別の方法?