3 ms·
> edit: and by the way, C++ is a bit surprising in this respect. "Hello" + 2 is equal to... "llo". Only surprising if you think "Hello" is an object of a strin
by shakna 8y ago
> edit: and by the way, C++ is a bit surprising in this respect. "Hello" + 2 is equal to... "llo".
Only surprising if you think "Hello" is an object of a string type. If however you think of it as a pointer, then moving the pointer is entirely unsurprising, especially as a pointer "is" an integer.