in main function, r can be displayed by cout, and when as a parameter assigned to const double &x, it just can't be displayed. only when type matched works.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
void ref(constdouble &x);
int main()
{
double m = 5;
constdouble &r = m;
cout << r;
ref(m);
cin.get();
}
void ref(constdouble &x)
{
cout << x*x <<"d";
}