title: return function in another child class from the same parent returns nothing
body: <p>Allright, so I have 3 classes which where 2 are a child class. The parent class is the Entity class which has a function that gets the coordinates of a sprite. If I run this function in the main() it works fine.</p>
  
  <p>Then I have the Wolf class which needs a player passed in its constructor. In the wolf.cpp theres an update function which I run every tick and it needs to get the coords for the player.</p>
  
  <p>My guess is I pass in the player wrong and it makes a copy or something. But I dont know how to do it properly and searching on google didnt really help right now. The best thing for me would be a straight answer. Here are the child classes. <strong>If you also need the entity class let me know.</strong></p>
  
  <p>Wolf.h</p>
  
  <pre><code>#pragma once
  #include "Entity.h"
  #include "Player.h"
  class Wolf : public Entity{
  public:
      Wolf(float speed, Player p);
      sf::Clock clock;
      sf::Vector2f playerCoords;
      Player player;
  public:
      void update();
  };
  </code></pre>
  
  <p>Wolf.cpp</p>
  
  <pre><code>#include &lt;SFML/Window.hpp&gt;
  #include &lt;SFML/Graphics.hpp&gt;
  #include "Wolf.h"
  #include &lt;iostream&gt;
  #include "math.h"
  
  sf::Texture holdTexture; 
  sf::Sprite holdSprite;
  
  
  Wolf::Wolf(float speed, Player p) :
      Entity(holdSprite, speed),
      player(p)
  {
      holdTexture.loadFromFile("Assets\\Wolf.png");
      sprite.setTexture(holdTexture);
  }
  </code></pre>
  
  <p>Player.h</p>
  
  <pre><code>#pragma once
  #include "Entity.h"
  class Player : public Entity {
  public:
      Player(sf::Sprite sprite, float speed);
      sf::Clock clock;
  public:
      void update();
  };
  </code></pre>
  
  <p>Player.cpp</p>
  
  <pre><code>#include "Player.h"
  
  Player::Player(sf::Sprite sprite, float speed) :
      Entity(sprite, speed)
  {}
  </code></pre>