title: C: How do I correctly access an Array element of a Struct passed by reference?
body: <p>I have this code:</p>
  
  <pre><code>typedef struct _structVar{
     int myArray[10];
  } structVar;
  
  structVar MyStruct;
  
  </code></pre>
  
  <p>Then I'm passing the struct by reference to a function:</p>
  
  <pre><code>myFunct(&amp;MyStruct);
  </code></pre>
  
  <p>How I access array elements inside MyFunct?</p>
  
  <pre><code>void myFunct(structVar *iStruct){
  
     for(char i=0; i&lt;10; i++)
        (*iStruct)-&gt;myArray[i] = i; //Fix Here
  }
  </code></pre>
  
  <p>Thanks for the help.</p>