title: C++ Pointer to struct member
body: <p>If I were to make a struct, say:    </p>
  
  <pre><code>struct FOO{    
      int x, y, z, a, b, c;  
  }
  
  int main(){  
      FOO foo = {1, 2, 3, 4, 5, 6};        
  
      return 0;
  }
  </code></pre>
  
  <p>Would there be anyway to create a pointer that can access FOO's integer members?<br>
  Maybe by making pointer that points to foo and then somehow modifying it to increment in integers?  </p>
  
  <p>I know that if I were to make FOO a class instead with a method that returns a pointer to the first int, then I could cycle though the members with ++ or [i](in a for loop). But I want to know if I can access structure members simply by knowing the address of the struct (assuming I have a good understanding of how to navigate said struct)</p>
  
  <p>Any insight would be much appreciated.
  Thanks!</p>