Is it impossible to do something like this in C?
struct room{
//Name of the room
char* name;
//Type fo the room
char* type;
//Array of outbound connections, max of six
struct room connections[6];
//A counter variable for how many connections the room actually has been assigned
int numOfConnections;
};
I am creating a map of rooms which are connected to each other, and I thought the easiest way for each room to keep track of the rooms it is connected to would be to make an array of room structs and then put the rooms in their.
I am getting an error that says room the array has an incomplete element type. The error is on the line "struct room connections[6];"