When you pass a value to a function, you pass a copy. The reason pointers work is because you are passing the location of an object. Think about it: to change the value of a primitive pointer, you have to dereference it. With classes, you have to call public methods.
Here is a basic example of what you were trying to do:
void method(int b){ b = 5;}int main(){ int a = 4; method(a); //what is a here? return 1;}
Would you expect a to be 5, after the function? of course not: you are passing a COPY of the value. Just as your are passing a COPY of the pointer in your code. Somewhere in memory is location a, which stores the pointer info. When you call your method, a new location is created in memory, location b, which has a copy of location a's data. When you change b in your method, a stays the same , right? But if you dereference b, it would point to the same place a would point to. But you can't actually change where a points, because it is a copy. Therefore, you could pass in a double pointer (**) and dereference the first pointer to change the value of a.
void someMethod(Entity **a){ *a = new Entity(...);}
Or what you could do is return the new pointer value, and set player equal to that.