title: how to set a int array inside a struct in c++
body: <p>I have </p>
  
  <pre><code>struct board{
      int x[3];
      int y[3];
  };
  
  // in the class PatternReader
  board PatternReader::testPattern1DX() {
     struct board aBoard;
     int x[3] = { 1,1,1 };
     aBoard = x;
     return aBoard;
  }
  </code></pre>
  
  <p>Error is "incompatible types in assignment of <code>int *</code>".</p>
  
  <p>How do you set arrays that are inside a struct?</p>