title: How do I solve the issue of multiple initialization when using malloc?
body: <p>I need to use malloc to allocate memory to one instance of struct game and store the return pointer in p_game_info for a game.</p>
  
  <p>This is the code for the relevant function in game.c</p>
  
  <pre><code>void play_game()
  {
      struct game *p_game_info = 0;
      struct game *p_game_info = malloc (sizeof (struct game));
  }
  </code></pre>
  
  <p>This is the code for the struct in game.h</p>
  
  <pre><code>struct game
  {
      char board[3][3];
      char playerNames[2][MAX_NAME_LEN];
      int status;
      boolean finished;
  };
  </code></pre>
  
  <p>In VS I am getting the following error message</p>
  
  <pre><code>error C2374: 'p_game_info': redefinition; multiple initialization
  </code></pre>
  
  <p>I have been searching online for a similar problem but have been unsuccessful.</p>
  
  <p>Thanks for your help.</p>