I was doing a project in C.And I am quite new to C. In the project, I have a struct like this :
struct room_t{
char* name;
struct room_t* north;
struct room_t* east;
struct room_t* south;
struct room_t* west;
}
declared as : struct room_t room[3]
If I want to access the name in north, I do this :room[0].north[0]->name
Am I right ? or should it be room[0].north[0].name
room[0].north->namestructs in yourstruct! What is unclear about dereferencing a pointer?