I\'m having a small problem trying to malloc this struct. Here is the code for the structure:
typedef struct stats { int strength;
You can't cast anything to a structure type. What I presume you meant to write is:
dungeon *d1 = (dungeon *)malloc(sizeof(dungeon));
But please don't cast the return value of malloc() in a C program.
malloc()
dungeon *d1 = malloc(sizeof(dungeon));
Will work just fine and won't hide #include bugs from you.
#include