恭喜你已经发现了面向对象编程的思想,只不过C语言不支持面向对象和泛型编程(这在C++中很容易实现),所以一般通过这种work around实现:
typedef struct node
{
union {
Human human;
Animal animal;
}object;
int objtype;
struct node *next;
}*linkedlist;
#define AS_HUMAN(node) (node).object.human
#define AS_ANIMAL(node) (node).object.animal