title: Move a Character in a 2d Array
body: <p>I'm taking an intro to c++ class and I am quite stuck on a part to this project. </p>
  
  <p>I need to have my character, 'H' move freely around the array. I have written a good amount of my code, but when I compile and run it, my hero isn't given the option to move. I don't know what is going wrong when I am calling my function in main. Any help would be gladly appreciated. I need his new position in the array to be maintained so that he can find the villain who is randomly placed in the array. I can work on the randint part later, but I am having a hard time simply getting 'H' to move.<br>
  Here is what I have so far:<br>
  Thank you.  </p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  void printBoard(char board[][8])
  {
      for (int x = 0; x &lt; 8; x++)
      {
          for (int y = 0; y &lt; 8; y++)
          {
              cout &lt;&lt; board[x][y];
          }
          cout &lt;&lt; endl;
      }
  }
  
  void move(char board[][8], char umove)
  {
      cout &lt;&lt; "Please enter which direction you would like to move." &lt;&lt; endl;
      cin &gt;&gt; umove;
  
      if (umove == 'x')
      {
          for (int x = 0; x &lt; 8; x++)
          {
              for (int y = 0; y &lt; 8; y++)
              {
                  board[x][y] = x - 1;
              }
          }
      }
      else if (umove == 'd')
      {
          for (int x = 0; x &lt; 8; x++)
          {
              for (int y = 0; y &lt; 8; y++)
              {
                  board[x][y] = y + 1;
              }
          }
      }
      else if (umove == 'a')
      {
          for (int x = 0; x &lt; 8; x++)
          {
              for (int y = 0; y &lt; 8; y++)
              {
                  board[x][y] = y - 1;
              }
          }
      }
  
      else if (umove == 'w')
      {
          for (int x = 0; x &lt; 8; x++)
          {
              for (int y = 0; y &lt; 8; y++)
              {
                  board[x][y] = x + 1;
              }
          }
      }
  
  }
  
  char userinput()
  {
      char usermove;
      cout &lt;&lt; "Please enter the direction you want to go." &lt;&lt; endl;
  
      cin &gt;&gt; usermove;
  
      return usermove;
  }
  
  int main()
  {
      char board[8][8];
      int x;
      int y;
      while (true)
      {
          for (x = 0; x &lt; 8; x++)
          {
              for (y = 0; y &lt; 8; y++)
              {
                  board[x][y] = 'e';
              }
          }
  
          board[0][0] = 'H';
  
          printBoard(board);
          void move();
  
          return 0;
      }
  }
  </code></pre>