我在C.做了一个项目.我是C的新手.在项目中,我有一个这样的结构:
struct room_t{
char* name;
struct room_t* north;
struct room_t* east;
struct room_t* south;
struct room_t* west;
}
Run Code Online (Sandbox Code Playgroud)
声明为: struct room_t room[3]
如果我想在北方访问该名称,我这样做:room[0].north[0]->name
我对吗 ?或应该是room[0].north[0].name