title: C - Accessing struct within a struct
body: <p>I was doing a project in C.And I am quite new to C. In the project, I have a struct like this :</p>
  
  <pre><code>struct room_t{
     char* name;
     struct room_t* north;
     struct room_t* east;
     struct room_t* south;
     struct room_t* west;
  }
  </code></pre>
  
  <p>declared as : <code>struct room_t room[3]</code></p>
  
  <p>If I want to access the name in north, I do this :<code>room[0].north[0]-&gt;name</code></p>
  
  <p>Am I right ?  or should it be <code>room[0].north[0].name</code></p>