title: 2d array in Struct - C -
body: <p>Im trying to assign a array to my letter.charData but i get this error:</p>
  
  <p>IntelliSense: expression must be a modifiable lvalue </p>
  
  <p>Im trying to add my array arr to letter.charData</p>
  
  <p>Thanks in advance!</p>
  
  <pre><code>struct _Letter{
      char character;
      int width;
      int charData[8][5];
  };
  
  typedef struct _Letter Letter;
  
  Letter *allocLetter(void)
  {
      Letter *letter;
  
      letter = (Letter*) malloc(1 * sizeof(Letter));
  
      letter-&gt;character = NULL;
      letter-&gt;width = NULL;
  
      /* charData? */
  
      return letter;
  }
  
  int main(void)
  { 
      Letter letter = *allocLetter();
  
      int arr[8][5] = 
      {
          0,0,0,0,0,
          1,0,0,0,0,
          1,0,0,0,0,
          1,0,0,0,0,
          1,0,0,0,0,
          1,0,0,0,0,
          1,0,0,0,0,
          1,0,0,0,0
      };
  
      letter.character = '1';
      letter.charData = arr;
  
      return(0);
  }
  </code></pre>