Errors, bugs, questions - page 1705
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Stupid. Can you tell me why you can't do that?
Got it.
Explain
Explain
here[0] is rvalue.
This is what is not clear.
If the assignment works in the first case, logically it should work in the second one as well. Because in the first case the same rvalue is assigned to the pointer, but the operator then works!
This is just my opinion, of course. But I want to make it out.
That's what I don't understand.
I don't understand it either. )) Upd. Already got it.
If assignment works in the first case, it should logically work in the second one as well. That's because in the first case, the same rvalue is assigned to the pointer but the operator works after that!
This is, of course, just my opinion. But I want to make it out.
rvalue can only be assigned to a left-handed value or be a temporary constant.
This is what works in the pluses:
This one doesn't.
This one isn't, and I can't figure out the difference:
If you add a link to the pointer it will work. Or a double pointer.
Oops, I'm slowing down, the second example isn't right at all.
That's why it is logical that
error: invalid initialization of non-const reference of type 'int*&' from an rvalue of type 'int*'