title: Iterate through struct variables
body: <p>I want to get an iterator to struct variable to set a particular one on runtime according to enum ID. for example -</p>
  
  <pre><code>struct {
  char _char;
  int _int;
  char* pchar;
  };
  
  enum {
  _CHAR, //0
  _INT,  //1
  PCHAR  //2
  };
  
  int main()
  {
      int i = 1; //_INT
      //if i = 1 then set variable _int of struct to some value.
  }
  </code></pre>
  
  <p>can you do that without if/else or switch case statements?</p>