#include #include #include "monster.h" struct monster { char name[N]; int health; }; struct monster* new_monster(char* name, int health) { struct monster* res = malloc(sizeof(*res)); strncpy(res->name, name, N); res->health = health; return res; } void print_monster(struct monster* monster) { printf("(%s, %d)\n", monster->name, monster->health); } void delete_monster(struct monster* monster) { free(monster); }