Please help me with this program and hopefully post a code thati can copy. Thank you.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
//———————————————————————–
// Some defines
#define NAME_MAX 64
#define BUFFER_MAX 256
// User instructions
const char *info[] = {
“Enter a command:”,
“”,
” ? – print this list of commands”,
” r – read monster database (binary file)”,
” w – write monster database (binary file)”,
” d – display monsters”,
” n – sort monsters by name (ascending)”,
” h – sort monsters by hitpoints (descending)”,
” q – quit”,
};
const int N_INFO = 9;
//———————————————————————–
// Structs
typedef struct Weapon_struct {
char name[NAME_MAX];
int damageModifier;
} Weapon;
typedef struct Stats_struct {
int agility;
int toughness;
int hitpoints;
} Stats;
typedef struct Monster_struct {
char name[NAME_MAX];
Stats stats;
Weapon weapon;
} Monster;
typedef