+ 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 Answers
0
99
0
Anybody? đ