title: Field 'tile' could not be resolved with typedef struct
body: <p>Hey guys this shouldn't be that hard, but why does </p>
  
  <pre><code>            fscanf(fp, "%d", Map.tile[x][y]);
  </code></pre>
  
  <p>The tile part says Field 'tile' could not be resolved
  Sorry for having beginner problems, but Im guessing it should be a problem with char to int conversions.
  How would I fix this?
  Thanks,
  waco001</p>
  
  <pre><code>void MapManager::loadMap(char *name){
      int x, y;
      FILE *fp;
  
      fp = fopen(name, "rb");
      const int MAX_MAP_Y = 32;
      const int MAX_MAP_X = 32;
      typedef struct Map
      {
          int tile[MAX_MAP_Y][MAX_MAP_X];
          char xs;
      } Map;
      /* If we can't open the map then exit */
  
      if (fp == NULL)
      {
          printf("Failed to open map %s\n", name);
  
          exit(1);
      }
  
      /* Read the data from the file into the map */
  
      for (y=0;y&lt;MAX_MAP_Y;y++)
      {
          for (x=0;x&lt;MAX_MAP_X;x++)
          {
              fscanf(fp, "%d", Map.tile[x][y]);
          }
      }
  
      /* Close the file afterwards */
  
      fclose(fp);
  }
  </code></pre>