How does dereference work C++
问题 I have trouble understanding what happens when calling &*pointer int j=8; int* p = &j; When I print in my compiler I get the following j = 8 , &j = 00EBFEAC p = 00EBFEAC , *p = 8 , &p = 00EBFEA0 &*p= 00EBFEAC cout << &*p gives &*p = 00EBFEAC which is p itself & and * have same operator precedence.I thought &*p would translate to &(*p)--> &(8) and expected compiler error. How does compiler deduce this result? 回答1: You are stumbling over something interesting: Variables, strictly spoken, are