If I declare:
int &y;
int *x;
x is of type "int *", but What is the type of variable y? Or does it not even make sense to ask that question?
If I declare:
int &y;
int *x;
x is of type "int *", but What is the type of variable y? Or does it not even make sense to ask that question?
This is a perfectly valid question. The type of variables is an int. However both use a different way of referencing the variable. According to standard nomenclature, in your case x is referred to as a pointer to an int. Whereas y is a reference to an int. Hope that helps.