title: Issue with double pointer in LINKED LIST
body: <p>I'm trying to make a data structure which contains all the monsters in the game. For some reason when I allocate new monster i get &quot;cannot convert Monster** to p_monster {Aka monster*} in initialization. If you could help me out it would be much appreciated. Thanks in advance</p>
  <pre><code>struct Monster {
      int x;
      int y;
      int health;
      Monster *next;
  };
  typedef Monster* p_monster;
  class gameUtils {
  protected:
    p_monster monster};
  public:
  gameUtils(){
  monster=NULL;
  ...}
  function(){
  monster = getMonster(monster)}  // so that I can assign whatever value I want to monster-&gt;last-&gt;next through the function itself
  
  p_monster getMonster(p_monster monster){
    p_monster newMonster = new p_monster;
          if(monster==NULL){
              monster=newMonster;
  
          }else{
      ....   // find last monster then create new one and pass it to caller
  
          return monster;   // returns new monster without any value
      } 
  
  </code></pre>