+ 1
const_cast: don’t understand specific internals of challenge
The following code is an already existing SoloLearn C++ challenge (plus some extra output): https://code.sololearn.com/cJz3vfRpCZ93/?ref=app I don’t understand the internal working of the value of the dereferenced *p after the const_cast (outputs 0). Pointer p still points to i and dereferenced pointer has different value than i? Is the compiler doing this at compile time? Or is my brain taking the wrong route somewhere?
2 Respuestas
0
99
0
Anybody? 😜