usingnamespace std;
double t = 5;
double test() {
return t;
}
int main()
{
test() = 14;
cout << t << '\n';
cin.get();
return 0;
}
It raises an error saying: the lvalue is not modifiable
I assume the returned value is a temporary object without an address to be able to refer to it. My question is, where is that temp object stored? In a register in the CPU, please? Does it have an address surprisingly?