Which version of the code will be compiled?
double a = 2.71;
const int &b = a;

double a = 2.71;
int &b = a;
A non-constant reference can only be assigned to an object of the same type as the reference type.

A constant reference can be assigned to an r-value or to an object whose type does not coincide with the reference type.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Зарегистрируйся сейчас
или Подпишись на будущие тесты