Normally you use * to declare a pointer variable and also to dereference the pointer back to the original variable afterwords. & returns the address from a variable
I haven't tested this, but does the following work any better?
#include
using namespace std;
double* GetSomeData()
{
double h = 46.50;
return &h;
}
int main()
{
double nonRef = GetSomeData();
double* ref = GetSomeData();
cout << "nonRef: " << nonRef << endl;
cout << "ref: " << *ref << endl;
return 0;
}