Like I said, pure luck. The return method used by the compiler happened to find the pointer at the position it looked at. The smallest change to the function could completely break this.
To fully understand why this is happening, you'd have to look at the generated Assembly.
It is not ok if you do you write a return for a function which is of return type! The compiler should return you an error regarding your function saying that nothing is returned! Afterall, you are writing this function for a purpose of expecting something to be computed/returned and pass it to some parameters in your main function.
If you do not intend to return any value. Just use void instead of PStation in the declaration!
@lwtan90 (2):
Compiler should not return a error! It must return a warning, like that:
control reaches end of non-void function
@nanger (63):
PStation ps=NULL;
-is a first element in your function, and it can be, that address of function may coincide with address of variable PStation ps=NULL,
when you try to call and execute function Station::make_station