title: Looking for an easy way to reinitialize a struct
body: <p>I have a struct called CoolStruct:</p>
  
  <pre><code>struct CoolStruct
  
  {
      int id;
      uint32 type;
      uint32 subtype;
      String name;
  };
  </code></pre>
  
  <p>I have a vector of these structs as well:</p>
  
  <pre><code>std::vector&lt;CoolStruct&gt; coolVector;
  </code></pre>
  
  <p>I want to create a bunch of structs which have predefined values to push_back into this coolVector. I'd like to keep the code from getting cludgy and ugly. I would really like to keep this notation:</p>
  
  <pre><code>CoolStruct t = {1, EQData::EQ_EFFECT_TYPE_PARAMETRIC, 0, T("Parametric")};
  coolVector.push_back(t);
  CoolStruct t =  {2, EQData::EQ_EFFECT_TYPE_FILTER_LOW_PASS,EQData::EQ_FILTER_TYPE_FILTER_BUTTERWORTH_12DB, T("Low Pass")};
  coolVector.push_back(t);
  </code></pre>
  
  <p>But of course this doesn't work... Not allowed to do a reinitialization. Is there any other solution to make this as readable as possible? The only alternative I can think of is it manually set each paramater of the struct:</p>
  
  <pre><code>t.id = whatever; t.type = somethingelse; t.subtype = thisisalotofcode; t.name = justtosetupthisvector;
  coolVector.push_back(t);
  </code></pre>