title: How can I index pointer type struct array inside struct?
body: <p>In the header file, I declared some structs like below</p>
  <pre><code>typedef struct ScopeStack {
      ste *entry[SCOPE_STACK_SIZE];
      int top;
  } ScopeStack;
  
  typedef struct ste {
      char *name;
      decl *declaration;
      struct ste *prev;
  } ste;
  
  typedef struct decl{
      int declclass; /* DECL class: VAR, CONST, FUNC, TYPE */
      decl *type; /* VAR, CONST: pointer to its TYPE decl*/
      int value; /* CONST: value of integer constant */
      float real_value; /* CONST: value of float constant */
      ste *formals; /* FUNC: pointer to formal argument list */
      decl *returntype; /* FUNC: pointer to return TYPE decl*/
      int typeclass; /* TYPE: type class: INT, array, ptr, … */
      decl *elementvar;/* TYPE (array): ptrto element VAR decl*/
      int num_index; /* TYPE (array): number of elements */
      ste *fieldlist; /* TYPE (struct): ptrto field list */
      decl *ptrto; /* TYPE (pointer): type of the pointer */
      int size; /* ALL: size in bytes */
      ste **scope; /* VAR: scope when VAR declared */
      decl *next; /* For list_of_variablesdeclarations */
  } decl;
  </code></pre>
  <p>If I declare variable like</p>
  <pre><code>ScopeStack *scopestack;
  </code></pre>
  <p>I'm curious whether I can access ste* type array inside scopestack by indexing</p>
  <pre><code>scopestack-&gt;entry[scopestack-&gt;top];
  </code></pre>