I am quite confused on how this works:
int number = 10; int* pointerOne = &number; int* pointerTwo = pointerOne; cout << *pointerTwo;
When I dereference pointerTwo, it should be printing pointerOnes memory address. Why is the compiler printing out the value of number?
https://stackoverflow.com/questions/65866803/pointer-holding-a-pointer-in-c-derefrence January 24, 2021 at 11:12AM
没有评论:
发表评论