title: Initializing struct, using an array
body: <p>I have a couple of array's:</p>
  
  <pre><code>const string a_strs[] = {"cr=1", "ag=2", "gnd=U", "prl=12", "av=123", "sz=345", "rc=6", "pc=12345"};
  const string b_strs[] = {"cr=2", "sz=345", "ag=10", "gnd=M", "prl=11", "rc=6", "cp=34", "cv=54", "av=654", "ct=77", "pc=12345"};
  </code></pre>
  
  <p>which i then need to parse out for '=' and then put the values in the struct. (the rc key maps to the fc key in the struct), which is in the form of:</p>
  
  <pre><code>struct predict_cache_key {
      pck() :
          av_id(0),
          sz_id(0),
          cr_id(0),
          cp_id(0),
          cv_id(0),
          ct_id(0),
          fc(0),
          gnd(0),
          ag(0),
          pc(0),
          prl_id(0)
      { }
  
      int av_id;
      int sz_id;
      int cr_id;
      int cp_id; 
      int cv_id;
      int ct_id;
      int fc;
      char gnd;
      int ag;
      int pc;
      long prl_id;
  };
  </code></pre>
  
  <p>The problem I am encountering is that the array's are not in sequence or in the same sequence as the struct fields. So, I need to check each and then come up with a scheme to put the same into the struct.</p>
  
  <p>Any help in using C or C++ to solve the above?</p>