3 ms·
OK, first of all, the syntax and the semantics of a pointer and a reference are completely different from each other. Departing from C, one must start thinking
by Koshkin 6y ago
OK, first of all, the syntax and the semantics of a pointer and a reference are completely different from each other. Departing from C, one must start thinking of a pointer as a variable containing a value that is a reference, the latter now always being a constant. That's pretty subtle, I must say. Add to that a very important distinction between lvalue, rvalue, and "universal" references, and then one needs to stay very much current as a C++ coder to remember all that.
- pjmlp 6y agoAh that is what you mean, then yeah I agree.