title: Illegal call to non-static member function (C++)?
body: <p>I'm developing a game which is based around the user controlling a ball which moves between areas on the screen. The 'map' for the screen is defined in the file ThreeDCubeGame.cpp:</p>
  
  <pre><code>char m_acMapData[MAP_WIDTH][MAP_HEIGHT];
  </code></pre>
  
  <p>The ThreeDCubeGame.cpp handles most of the stuff to do with the map, but the player (and keyboard input) is controlled by ThreeDCubePlayer.cpp. When a player moves into a new map cell, the game will have to check the contents of that cell and act accordingly. This function in ThreeDCubeGame.cpp is what I am trying to use:</p>
  
  <pre><code>inline char GetMapEntry( int iMapX, int iMapY ) { return m_acMapData[iMapX][iMapY]; }
  </code></pre>
  
  <p>So, in order to check whether the player is allowed to move into a map cell I use this function call from ThreeDCubePlayer.cpp:</p>
  
  <pre><code>if (ThreeDCubeGame::GetMapEntry(m_iMapX+MAP_OFF_X, m_iMapY+MAP_OFF_Y) == ' ')
  {
  // do stuff
  }
  </code></pre>
  
  <p>But, when I compile this, I get the warning "error C2352: 'ThreeDCubeGame::GetMapEntry' : illegal call of non-static member function". Is this something to do with the scope of the variables? Is it fixable without redesigning all the code?</p>