title: assign parts of struct to another struct in c
body: <p>I want something conceptually like this in c/c++</p>
  
  <pre><code>struct first{
     int a,b,c;
  }my1;
  
  struct second{
     int a,b,c;
     int extended;
  }my2;
  </code></pre>
  
  <p>and somehow be able to have </p>
  
  <pre><code>my2=my1; 
  </code></pre>
  
  <p>(meaning only copy the same parts. leaving extended untouched)</p>
  
  <p>I thought of solving it as </p>
  
  <pre><code>struct second{
       first first_;
       int extended;
   }my2;
  </code></pre>
  
  <p>and have </p>
  
  <pre><code>my2.first_ = my1;
  </code></pre>
  
  <p>but it is a bit ugly for me. is there any more clear solution for this?
  probably it is something like extending a structure or something?</p>