title: exc_bad_access (code= 2 address =0x0)
body: <p>I am new to this, trying to make an Minesweeper iphone app</p>
  
  <p>i used a IBButton to Reset mine fields 
  which is a 2 by 2 matrix of a struct</p>
  
  <pre><code>- (IBAction) Reset {
      for (int x = 0 ; x &lt; 10 ; x ++) {
         for (int y = 0 ; y &lt; 10 ; y++ ) {
             f[x][y]-&gt;isOpen = NO;
             f[x][y]-&gt;display = 0; //Going to make a search function for finding Number of mines next to it
             int random = arc4random()%10;
             if (random &lt; 2) {
                 f[x][y]-&gt;isMine = YES;
             } else {
                 f[x][y]-&gt;isMine = NO;
             }
          }
      }
  </code></pre>
  
  <p>so i get the the error at the very first line of my for loop
  f[x][y]->....</p>
  
  <p>what did i do wrong here?</p>
  
  <p>/edit </p>
  
  <p>This is how i declared my f</p>
  
  <pre><code>struct feild *f[10][10];
  struct feild{
      bool isOpen;
      bool isMine;
      int display;
  }
  </code></pre>