title: I don't understand why this function "returns a pointer from the list"
body: <p>The book I'm reading, <em><a href="https://www.ssucet.org/old/pluginfile.php/2583/mod_resource/content/1/ETEC%201101%20Intro%20to%20Data%20Structures%20with%20Linked%20Lists%20%28Presentation%2021%29.pdf" rel="noreferrer">Introduction to Data Structures with Linked Lists
  (Presentation 21)</a></em>, has 2 examples of linked lists. Here is the first one:</p>
  
  <pre><code>EnemySpaceShip* getNewEnemy ()
  {
      EnemySpaceShip* p_ship = new EnemySpaceShip;
      p_ship-&gt;x_coordinate = 0;
      p_ship-&gt;y_coordinate = 0;
      p_ship-&gt;weapon_power = 20;
      p_ship-&gt;p_next_enemy = p_enemies;
      p_enemies = p_ship;
      return p_ship;
  }
  </code></pre>
  
  <p>The second example of linked lists is this one:</p>
  
  <pre><code>EnemySpaceShip* addNewEnemyToList (EnemySpaceShip* p_list)
  {
      EnemySpaceShip* p_ship = new EnemySpaceShip;
      p_ship-&gt;x_coordinate = 0;
      p_ship-&gt;y_coordinate = 0;
      p_ship-&gt;weapon_power = 20;
      p_ship-&gt;p_next_enemy = p_list;
      return p_ship;
  }
  </code></pre>
  
  <p>Then the book writes this:</p>
  
  <blockquote>
    <p>Notice that this function differs from <code>getNewEnemy</code> because it returns a pointer to the list, rather than the new enemy.</p>
  </blockquote>
  
  <p>What I don't understand is what he means by the "second function returns a pointer to the list" and "the first function returns the new enemy". I thought that they have both created a new enemy called <code>p_ship</code> (which is both a pointer and a new enemy) and returned it.  What is meant by this statement?</p>