title: Assign a whole struct at once in an array
body: <p>I am learning C++ and I have a problem with <code>struct</code> and arrays. My struct is:</p>
  
  <pre><code>struct board
  {
      string name;
      string desc;
      int nval;
      int sval;
      int eval;
      int wval;
  };
  </code></pre>
  
  <p>My array looks like this:</p>
  
  <pre><code>board field[10][10];
  </code></pre>
  
  <p>I'm able to do for example:</p>
  
  <pre><code>field[5][6].name = "ExampleName";
  field[5][6].desc = "This is an example";
  field[5][6].nval = 3;
  //and so on...
  </code></pre>
  
  <p>But I want to assign to the whole structure at once, something like this:</p>
  
  <pre><code>field[5][6] = {"ExampleName", "This is an example", 3, 4, 5, 6};
  //so I don't have to type everything over and over again...
  </code></pre>